1. On the Attribute Sources & User Lookup window, go to the Configure Data Source Filters tab.

    Use the Configure Data Source Filters tab to filter the REST API datastore content.
  2. Optional: Enter a relative path, additional query parameters, or both in the Resource Path field.
    Tip:

    You can specify a default attribute value in the form of ${attributeName:-defaultValue} to use at runtime when the attribute value is not available. Do not use ${ and } in the default value.

  3. Optional: To use a previously-received bearer token in an authorization header, specify the bearer token in the Authorization Header field.
  4. Optional: Define the Body sent with a GET or POST request to the REST API datastore.

Example

You have use cases that can leverage user attributes obtained through REST APIs. The data source returns user records in JSON. It also provides the following paths to access its data based on user populations:

  • https://rest.example.com/development/users
  • https://rest.example.com/staging/users

To retrieve the record of a particular user, the request must include the uid query parameter with the identifier of the user.

Your use cases focus on users under the /staging/users path. Your authentication policy uses the HTML Form Adapter, which captures user identifiers using the username attribute.

To address this sample use case:

  1. Create a REST API datastore with a base URL of https://rest.example.com.
  2. Add the REST API datastore as an attribute source in the applicable use cases, such as a service provider (SP) connection that uses an HTML Form Adapter instance or an OAuth identity provider (IdP) Adapter Mapping configuration that maps from an HTML Form Adapter instance into the persistent grants.
  3. When prompted to configure the filtering option on the Configure Data Source Filters window, enter /staging/users?uid=${username} in the Resource Path field.