Page created: 16 Jul 2021
|
Page updated: 3 Mar 2022
You can configure data source filters for a 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:
- Create a REST API datastore with a base URL of https://rest.example.com.
- 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.
- When prompted to configure the filtering option on the Configure Data
Source Filters window, enter
/staging/users?uid=${username}
in the Resource Path field.