Rate this page

Data Types and Resource Format

The Data Governance Broker’s SCIM APIs use the data types and resource format specified by the SCIM 2.0 schema standard, RFC 7643.

SCIM data types

SCIM attributes are typed. The following data types are used:

Data type Description
string A JSON string.
boolean A JSON boolean value. May have either of the literal values true or false.
decimal A JSON floating-point number.
integer A JSON integer number.
dateTime A JSON string representing a timestamp. SCIM DateTime values are always encoded as an xsd:dateTime value, as specified by XML Schema, section 3.3.7.
binary A JSON string representing a binary value. SCIM binary values are always base64-encoded.
reference A JSON string representing a reference to another resource. A SCIM reference is always a URI: This may be a URN, the URL of another SCIM resource, or simply another URL. URLs may be absolute or relative.
complex A JSON object. A SCIM complex attribute is a composition of sub-attributes; these sub-attributes may have any data type except for “complex”.

A SCIM attribute may also be multi-valued. All members of a multi-valued attribute must be of the same data type.

SCIM resource format

A SCIM resource is always represented as a JSON object.

The attributes available in any particular SCIM resource type are defined by the schemas associated with the resource type. A resource type has at least one core schema and may have zero or more extension schemas. An extension schema may be configured to be either required or optional for a resource to be valid.

SCIM schemas provide the means of namespacing JSON attributes. Every schema is identified by a unique schema URN prefix. When specifying attributes, the schema URN prefix is implied for attributes belonging to the core schema but must be provided for attributes belonging to extension schemas. Consider this example resource:

{
  "schemas": [
    "urn:pingidentity:schemas:User:1.0",
    "urn:pingidentity:schemas:sample:profile:1.0"
  ],
  "id": "2c508605-c3d9-1225-8f27-9e3c8f419403",
  "meta": {
    "created": "2016-06-07T13:13:30.873Z",
    "lastModified": "2016-06-07T13:13:30.873Z",
    "resourceType": "Users",
    "location": "https://example.com/scim/v2/Users/2c508605-c3d9-1225-8f27-9e3c8f419403"
  },  
  "userName": "joe.chip",
  "name": {
    "familyName": "Chip",
    "formatted": "Joe Chip",
    "givenName": "Joe"
  },
  "accountVerified": true,
  "urn:pingidentity:schemas:sample:profile:1.0": {
    "termsOfService": [
      {
        "id": "urn:X-pingidentity:ToS:StandardUser:1.0",
        "timeStamp": "2014-11-23T16:36:59Z",
        "collector": "urn:X-pingidentity:App:Mobile:1.0"
      }
    ]
  }
}

This resource has two schemas:

  1. A core schema: urn:pingidentity:schemas:User:1.0
  2. An extension schema: urn:pingidentity:schemas:sample:profile:1.0

The core schema attribute userName may be specified as userName or as urn:pingidentity:schemas:User:1.0.

The extension schema attribute termsOfService may only be specified as urn:pingidentity:schemas:sample:profile:1.0.

Common attributes

In addition to core schema and extension schema attributes, all SCIM resources of any type may have certain common attributes. These attributes never need to be namespaced with a URN.

Common attribute Description
id An immutable unique identifier for the resource. This attribute is always present.
externalId An optional identifier assigned to the resource by the client that provisioned it.
meta A complex read-only attribute containing resource metadata. Its sub-attributes are described in the following table.
Meta sub-attribute Description
resourceType The resource type.
created A timestamp indicating the resource’s creation date.
lastModified A timestamp indicating the time of the resource’s last update.
location The canonical URI of the resource.

List responses

Some SCIM responses, such as search responses, contain multiple resources. These responses are called list responses and have a consistent format using the following fields:

Field Type Provided? Description
schemas array always The SCIM schema of the list response. Always contains the value urn:ietf:params:scim:api:messages:2.0:ListResponse.
totalResults number always The number of matching resources.
startIndex number The 1-based index of the first result in the current set of list results. Always present if pagination is used.
itemsPerPage number The number of resources returned per page. Always present if pagination is used.
Resources array always An array consisting of one or more resource objects. For example, this may contain all of the User resources matching a search query.