Supported SCIM Actions

Detailed API Calls for the SCIM implementation

Supported actions

SCIM provides several options for manipulating groups and users. Snapdocs supports the following options.

Create User

EndpointHttp Method
v1/scim/v2/UsersPOST

Example Request

{
    "schemas":
        [
                "urn:ietf:params:scim:schemas:core:2.0:User",
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
        ],
    "active": true,
    "name": {
        "familyName": "Test",
        "givenName": "Example"
    },
    "emails": [],
    "externalId": "corp12345",
    "userName": "example.test",
    "phoneNumbers": [],
    "photos": []
    
}

Response

CodeDescription
201Success

Example Response


{
    "active": true,
    "emails": null,
    "externalId": "corp12345",
    "groups": null,
    "id": "e70bd0f2-d8e8-47cc-8e83-f81556703947",
    "locale": "",
    "meta": {
        "resourceType": "User",
        "created": "2023-02-13T04:09:28Z",
        "lastModified": "2023-02-13T04:09:28Z",
        "location": "Users/e70bd0f2-d8e8-47cc-8e83-f81556703947",
        "version": "W/703d83dd3833e8f8f67ffcdbf8946de8c265e709fd62a6700193619fa9c568ad"
    },
    "name": {
        "formatted": "",
        "familyName": "Test",
        "givenName": "Example",
        "middleName": "",
        "honorificPrefix": "",
        "honorificSuffix": ""
    },
    "phoneNumbers": null,
    "photos": [
        {
            "value": "https://d3emmwjsoke5z5.cloudfront.net/assets/200x200-9d5f295225b0d22edca5282eb5e9036ef6bfe625f0359dceaa6f816b4f5a2895.gif",
            "display": "",
            "type": "photo",
            "primary": true
        }
    ],
    "preferredLanguage": "",
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
    ],
    "timezone": "",
    "title": "",
    "userName": "example.test",
    "userType": ""
}

Get User

EndpointHttp Method
v1/scim/v2/Users/{{user_id}}GET

Response

CodeDescription
200Success

Example Response


{
    "active": true,
    "emails": null,
    "externalId": "corp12345",
    "groups": null,
    "id": "e70bd0f2-d8e8-47cc-8e83-f81556703947",
    "locale": "",
    "meta": {
        "resourceType": "User",
        "created": "2023-02-13T04:09:28Z",
        "lastModified": "2023-02-13T04:09:28Z",
        "location": "Users/e70bd0f2-d8e8-47cc-8e83-f81556703947",
        "version": "W/703d83dd3833e8f8f67ffcdbf8946de8c265e709fd62a6700193619fa9c568ad"
    },
    "name": {
        "formatted": "",
        "familyName": "Test",
        "givenName": "Example",
        "middleName": "",
        "honorificPrefix": "",
        "honorificSuffix": ""
    },
    "phoneNumbers": null,
    "photos": [
        {
            "value": "https://d3emmwjsoke5z5.cloudfront.net/assets/200x200-9d5f295225b0d22edca5282eb5e9036ef6bfe625f0359dceaa6f816b4f5a2895.gif",
            "display": "",
            "type": "photo",
            "primary": true
        }
    ],
    "preferredLanguage": "",
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
    ],
    "timezone": "",
    "title": "",
    "userName": "example.test",
    "userType": ""
}

Get Users

EndpointHttp Method
v1/scim/v2/UsersGET

Response

CodeDescription
200Success

Example Response


{
   "Resources":[
      {
         "active":true,
         "emails":null,
         "externalId":"corp12345",
         "groups":null,
         "id":"e70bd0f2-d8e8-47cc-8e83-f81556703947",
         "locale":"",
         "meta":{
            "resourceType":"User",
            "created":"2023-02-13T04:09:28Z",
            "lastModified":"2023-02-13T04:09:28Z",
            "location":"Users/e70bd0f2-d8e8-47cc-8e83-f81556703947",
            "version":"W/703d83dd3833e8f8f67ffcdbf8946de8c265e709fd62a6700193619fa9c568ad"
         },
         "name":{
            "formatted":"",
            "familyName":"Test",
            "givenName":"Example",
            "middleName":"",
            "honorificPrefix":"",
            "honorificSuffix":""
         },
         "phoneNumbers":null,
         "photos":[
            {
               "value":"https://d3emmwjsoke5z5.cloudfront.net/assets/200x200-9d5f295225b0d22edca5282eb5e9036ef6bfe625f0359dceaa6f816b4f5a2895.gif",
               "display":"",
               "type":"photo",
               "primary":true
            }
         ],
         "preferredLanguage":"",
         "schemas":[
            "urn:ietf:params:scim:schemas:core:2.0:User"
         ],
         "timezone":"",
         "title":"",
         "userName":"example.test",
         "userType":""
      }
   ]
}

Filters

Filters are supported on the Get Users endpoint. We support filtering on userName.

EndpointHttp Method
v1/scim/v2/Users?filter=userName eq "example.test"GET

Response

CodeDescription
200Success

Example Response


{
   "Resources":[
      {
         "active":true,
         "emails":null,
         "externalId":"corp12345",
         "groups":null,
         "id":"e70bd0f2-d8e8-47cc-8e83-f81556703947",
         "locale":"",
         "meta":{
            "resourceType":"User",
            "created":"2023-02-13T04:09:28Z",
            "lastModified":"2023-02-13T04:09:28Z",
            "location":"Users/e70bd0f2-d8e8-47cc-8e83-f81556703947",
            "version":"W/703d83dd3833e8f8f67ffcdbf8946de8c265e709fd62a6700193619fa9c568ad"
         },
         "name":{
            "formatted":"",
            "familyName":"Test",
            "givenName":"Example",
            "middleName":"",
            "honorificPrefix":"",
            "honorificSuffix":""
         },
         "phoneNumbers":null,
         "photos":[
            {
               "value":"https://d3emmwjsoke5z5.cloudfront.net/assets/200x200-9d5f295225b0d22edca5282eb5e9036ef6bfe625f0359dceaa6f816b4f5a2895.gif",
               "display":"",
               "type":"photo",
               "primary":true
            }
         ],
         "preferredLanguage":"",
         "schemas":[
            "urn:ietf:params:scim:schemas:core:2.0:User"
         ],
         "timezone":"",
         "title":"",
         "userName":"example.test",
         "userType":""
      }
   ]
}

Delete User

EndpointHttp Method
v1/scim/v2/Users/{{user_id}}DELETE

Response

CodeDescription
204Success

Replace User

EndpointHttp Method
v1/scim/v2/Users/{{user_id}}PUT

Example Request

{
    "schemas":
        [
                "urn:ietf:params:scim:schemas:core:2.0:User",
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
        ],
    "active": true,
    "name": {
        "familyName": "Test",
        "givenName": "Example"
    },
    "emails": [],
    "externalId": "corp12345",
    "userName": "example.test",
    "phoneNumbers": [],
    "photos": []
    
}

Response

CodeDescription
201Success

Get Groups

EndpointHttp Method
v1/scim/v2/GroupsGET

Response

CodeDescription
200Success

Example Response

{
    "Resources": [
        {
            "displayName": "Admins",
            "id": "748d0c35-2497-4107-a032-6b56884af308",
            "members": null,
            "meta": {
                "resourceType": "Group",
                "created": "2023-03-02T03:24:51Z",
                "lastModified": "2023-03-02T03:24:51Z",
                "location": "Groups/748d0c35-2497-4107-a032-6b56884af308",
                "version": "W/55932e6a2bc2eafd2fa4d35fcb275dd21b1b9484b2c2365ddce9dbc47d3b91fb"
            },
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:Group"
            ]
        },
        {
            "displayName": "Closers",
            "id": "da453c19-9111-49cc-afb7-5897bb3c538b",
            "members": null,
            "meta": {
                "resourceType": "Group",
                "created": "2023-03-02T03:24:51Z",
                "lastModified": "2023-03-02T03:24:51Z",
                "location": "Groups/da453c19-9111-49cc-afb7-5897bb3c538b",
                "version": "W/30ad2ea8d82df80fc8352d6d7144d177b08eaa50e2d7be3c618927a9e43fc4d9"
            },
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:Group"
            ]
        },
        {
            "displayName": "Managers",
            "id": "8245226a-d57b-40bb-bfe0-cc16bc06fef8",
            "members": null,
            "meta": {
                "resourceType": "Group",
                "created": "2023-03-02T03:24:51Z",
                "lastModified": "2023-03-02T03:24:51Z",
                "location": "Groups/8245226a-d57b-40bb-bfe0-cc16bc06fef8",
                "version": "W/81c4351f13ad4d36122a3f4a729afddbcb8af740cdd10080d6c8ef70dccc26d1"
            },
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:Group"
            ]
        },
        {
            "displayName": "Viewers and Commenters",
            "id": "a47da7fd-1b65-4732-95aa-a8ce76ad64af",
            "members": null,
            "meta": {
                "resourceType": "Group",
                "created": "2023-03-02T03:24:51Z",
                "lastModified": "2023-03-02T03:24:51Z",
                "location": "Groups/a47da7fd-1b65-4732-95aa-a8ce76ad64af",
                "version": "W/4b5a480cd0641dde2ede653a80e9c83843a0483061b545819c1e34c232614c46"
            },
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:Group"
            ]
        }
    ],
    "itemsPerPage": 100,
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "startIndex": 1,
    "totalResults": 4
}

Get Group

EndpointHttp Method
v1/scim/v2/Groups/{{group_id}}GET

Response

CodeDescription
200Success

Example Response

{
    "displayName": "Closers",
    "id": "da453c19-9111-49cc-afb7-5897bb3c538b",
    "members": [],
    "meta": {
        "resourceType": "Group",
        "created": "2023-03-02T03:24:51Z",
        "lastModified": "2023-03-02T03:24:51Z",
        "location": "Groups/da453c19-9111-49cc-afb7-5897bb3c538b",
        "version": "W/f099f607e8c65a2c264a2feceaf518872953537bc396ee73e24d252e952d188f"
    },
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
    ]
}

Add User to Group

EndpointHttp Method
v1/scim/v2/Groups/{{group_id}}PATCH

Example Request

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "add",
      "path": "members",
      "value": [
        {
          "value": "e70bd0f2-d8e8-47cc-8e83-f81556703947"
        }
      ]
    }
  ]
}

Response

CodeDescription
200Success

Remove User from Group

EndpointHttp Method
v1/scim/v2/Groups/{{group_id}}PATCH

Example Request

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "remove",
      "path": "members[value eq \"e70bd0f2-d8e8-47cc-8e83-f81556703947\"]"
    }
  ]
}

Response

CodeDescription
200Success

Remove All Users from Group

EndpointHttp Method
v1/scim/v2/Groups/{{group_id}}PATCH

Example Request

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "remove",
      "path": "members"
    }
  ]
}

Response

CodeDescription
200Success