Overview#

SCIM defines a standard set of operations that can be used to filter, sort, and paginate SCIM Search results.

The operations are specified by adding query parameters to the Resource's endpoint. SCIM Service Providers MAY support additional query parameters not specified here, and SCIM Service Providers SHOULD ignore any query parameters they don't recognize.

SCIM Search Request for All Users#

The below example returns the userName for all Users:
GET /Users?attributes=userName
Host: example.com
Accept: application/json
Authorization: Bearer h480djs93hd8

Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "totalResults":2,
  "schemas":["urn:scim:schemas:core:1.0"],
  "Resources":[
    {
      "userName":"bjensen"
    },
    {
      "userName":"jsmith"
    }
  ]
}

SCIM Search Request Example#

In addition to getting single Resources it is possible to fetch sets of Resources by querying the Resource end point without the id of a specific Resource. Typically, a fetch request will include a filter to be applied to the Resources. SCIM has support for the filter operations equals, contains, starts with, and more. In addition to filtering the response it is also possible to ask the service provider to sort the Resources in the response.

In addition to filtering the response it is also possible to ask the service provider to sort the Resources in the response, return specific attributes of the resources, and return only a subset of the resources. The syntax for the request is:

https://example.com/{resource}?filter={attribute} {op} {value} & sortBy={attributeName}&sortOrder={ascending|descending}&attributes={attributes}

A typical Filter Request URL might be for Title=pr and userType=Employee:

https://example.com/Users?filter=title pr and userType eq “Employee”__&sortBy__=title&sortOrder=ascending&attributes=title,username

Filter Response Example#

The response to a GET request is a list of matching resources:
{
  "schemas":["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
  "totalResults":2,
  "Resources":[
    {
      "id":"c3a26dd3-27a0-4dec-a2ac-ce211e105f97",
      "title":"Assistant VP",
      "userName":"bjensen"
    },
    {
      "id":"a4a25dd3-17a0-4dac-a2ac-ce211e125f57",
      "title":"VP",
      "userName":"jsmith"
    }
  ]
}

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-2) was last changed on 21-May-2016 16:15 by jim