REST API – Support filtering and specifying the attributes to retrieve in the same request

Introduction

This document will guide you how to use the filtering endpoint along with specific attributes to retrieve only needed information instead of receiving the whole resource object.

SCIM 2.0 specification

The SCIM 2.0 specification defines an attributes parameter that you can use to retrieve specific attributes:


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.


Request body example:

Supported endpoints

Identify REST API supports the "attributes" parameter for all .filter endpoints:

  • api/rest/v2/users/.filter
  • api/rest/v2/claimdefinitions/.filter
  • api/rest/v2/connections/.filter
  • api/rest/v2/groups/.filter
  • api/rest/v2/organizations/.filter
  • api/rest/v2/attributeservices/.filter
  • api/rest/v2/transformations/.filter
  • api/rest/v2/messagequeues/.filter

Response info and examples

This parameter is optional, so if it is not presented, the whole resource object is returned.

Example:

This request will return a list of users with full information:

With the support of the "attributes" parameter, you can specify to return a subset of user information such as "username,displayname,email". For example:

Only required fields are returned:

Note:

  • "Id" is a required field, so it is returned by default even if it is not included in the "attributes" parameter.
  • Identify REST API attributes filter only supports the first level of resource’s attributes.
  • A nonexistent attribute is ignored by default.