Execute an accessor

Once you have configured an accessor, you can access user data by executing the accessor.

Methods to Execute an Accessor:

  1. Call the ExecuteAccessor API
  2. Use the UserClouds SDK
    Download and deploy your tenant's code-generated UserClouds SDK, and call the accessor using its SDK function name.

Execute Accessor Parameters

See the API Reference for more detail.

Parameters:

  • selector_values: An array of SelectorValues, which are evaluated by the accessor's selector to define which users' data should be read.
  • client_context_data (optional): Client context data, which might be checked by the access policy.
  • starting_after: A cursor value after which the returned list will start. An API consumer can only specify starting_after or ending_before, not both. The default isstarting_after with the special cursor value CursorBegin (the empty string), which paginates from the start of the collection.
  • ending_before: A cursor value before which the returned list will end. An API consumer can only specify starting_after or ending_before, not both. Unless you are synthetically composing your own cursor (not recommended), you would typically use the special cursor value CursorEnd (the string "end"), which paginates from the end of the collection.
  • limit: The maximum number of results to be returned per page.
  • sort_key: A comma-delimited list of column names to sort the returned list by. System columns "id", "created", and "updated" can be used for sorting without being included in the accessor's column set. All other sort columns must be in the accessor's column list. Only single-value (i.e. non-array), non-composite columns with the following concrete data types can be used as sort keys: uuid, string, integer, boolean, timestamp. The default sort key is "id". Note: The "id" column must be the final sort key to ensure stable sorting.
  • sort_order: The order in which results should be sorted. Can be either "ascending" (default) or "descending".

Execution Process

When you execute an accessor, the following steps occur in sequence:

  1. Selection: The accessor selects the relevant user records according to the selector values and the accessor's selector clause.
  2. Access Policy Evaluation: Several access policies are evaluated for each user record, using the data passed in context and data in the user object:
    1. Global baseline policy for accessors: Applied to ensure baseline security. Learn more here.
    2. Column-default access policies: Column default policies for all columns accessed by the accessor are applied, unless overridden. Learn more here.
    3. Accessor-specific access policy composition: Applied in addition to the above policies.
  3. Consent Check: For each remaining record and column, the accessor checks the user has consented to the specified purpose of the accessor. User records without consent for the stated purpose across all columns are filtered out.
  4. Data Transformation: The accessor transforms the user data according to its configuration.
  5. Response: The accessor returns the transformed data.