SCIM API endpoint details and syntax for groups

The Quick Base API endpoints support the SCIM 2.0 protocol and allow you to create, read, update, and delete (CRUD) groups using the following HTTP methods:

  • GET - get groups in a realm/search for groups in an app or realm

  • POST - create groups/provision groups

  • PUT - update/edit group information

  • DELETE - delete groups

  • PATCH - patch group information

A bearer token is used for authentication using a Quick Base user token. For more details, select Setting up a user and user token for SCIM provisioning for details.

The groupId used in the following code examples is the group ID created by Quick Base, not the IdM provisioned group ID.

Get groups in a realm
  • Get all groups: GET { SCIMBaseURL}/groups
  • Get groups with pagination: GET { SCIMBaseURL}/groups?count=1&startIndex=1
  • Get groups with groupId: GET { SCIMBaseURL}/groups/{groupId}
Create groups or provision groups

To create or provision a new group, use the following request format:

POST { SCIMBaseURL}/groups 
 { 
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"], 
    "displayName": “scimGroup-Test1", 
    "members": { 
        "value": "{userID}", 
                "$ref": "{Users/userID}", 
                "display": "Jane Doe",
    }], 
 } 
Update or patch groups

To update an existing group, use the following request format:

PUT { SCIMBaseURL}/groups/{groupId} 
 { 
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"], 
    "displayName": “scimGroup-Test1", 
    "members": { 
        "value": "{userID}", 
                "$ref": "{Users/userID}", 
                "display": "Jane Doe",
    }], 
 } 

To patch an existing group by adding members, use the following request format:

Only the members you specified in the request are added to the group memberships.

PATCH { SCIMBaseURL}/groups/{groupId} 
 {"schemas":  
       ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], 
      "Operations":[ 
        {
         "op":"add", 
         "path": "members", 
         "value":[
          {
            "display": "Babs Jensen",
            "$ref":"{Users/userID}", 
            "value": "{userID}" 
          } 
         ] 
        } 
       ]
      } 

To patch an existing group by replacing all members, use the following request format:

PATCH { SCIMBaseURL}/groups/{groupId} 
 {"schemas":  
       ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], 
      "Operations":[ 
        {
         "op":"replace", 
         "path": "members", 
         "value":[
          {
            "display": "Babs Jensen",
            "$ref":"{Users/userID}", 
            "value": "{userID}" 
          }, 
          {
            "display": "James Smith",
            "$ref":"{Users/userID}", 
            "value": "{userID}" 
          }           
         ]  
        }          
       ]
      } 

To remove a member using the "eq" filter, use the following request format:

When you remove a member using the "eq" filter, the members listed in the path with the filter are removed from this group. No other memberships of the group are modified.

PATCH { SCIMBaseURL}/groups/{groupId} 
 { "schemas":  
     ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], 
   "Operations":[ 
     {
       "op":"remove", 
       "path": 
           "members[value eq\"{userID}\"]"
     },
   ]     
 }        

To remove a member without the "eq" filter, use the following request format:

When you remove a member without the "eq" filter, the members listed under "value" are removed from this group. No other memberships of the group are modified.

PATCH { SCIMBaseURL}/groups/{groupId}    
 { "schemas"
     ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],    
   "Operations":[        
 {
       "op":remove", 
       "path": "members", 
       "value":[{
              "display": "James Smith",
              "$ref":"{Users/userID}", 
              "value": "{userID}" 
          }, 
          {
            "display": "Babs Smith",
            "$ref":"{Users/userID}", 
            "value": "{userID}" 
          }           
         ]  
        }          
       ]
      }        
Delete groups

To delete a group, use the following request format:

DELETE { SCIMBaseURL}/groups/{groupId} 

The base URL for SCIM above is: { SCIMBaseURL} = {BaseURL}/ governance/scim/v2/

Related Topics:

 

Go back

Did this help you? Give us a rating:

           

© 1999-2019 QuickBase, Inc. All rights reserved. Legal Notices.