Chat now with support
Chat mit Support

Identity Manager 8.2 - REST API Reference Guide

Using offset and limit parameters to cycle through records

Some requests result in responses that contain many records. For example, the request for the list of all persons can match hundreds or thousands of persons.

To limit the number of records returned, some of the APIs support the limit and offset query parameters. These parameters allow you to get successive sets of records in successive responses. Specifically, use these query parameters to do the following:

  • Limit the number of records returned in the response to a number you choose, using the query parameter limit.

    For example, the following request returns the first 50 persons:

    https://<Hostname>/AppServer/api/entities/person?&limit=50

  • Specify the index of the first record to return in the response, using the query parameter offset.

    The value is zero-based. For example, the following request returns 50 persons, starting with the 101st person:

    https://<Hostname>/AppServer/api/entities/person?&limit=50&offset=100

    The offset parameter defaults to 0. Therefore, both of the following requests return 50 devices, starting with the first device:

    https://<Hostname>/AppServer/api/entities/person?&limit=50&offset=0

    https://<Hostname>/AppServer/api/entities/person?&limit=50

Therefore, to get successive sets of records in successive responses, increase the offset value by the limit value in each request. For example:

https://<Hostname>/AppServer/api/entities/person?&limit=50&offset=0

https://<Hostname>/AppServer/api/entities/person?&limit=50&offset=50

https://<Hostname>/AppServer/api/entities/person?&limit=50&offset=100

The following table summarizes the limit and offset query parameters.

Table 7: Pagination parameters

Query parameter

Description

Default value

limit

Maximum number of records to show in the response.

0

offset

Zero-based index of first record to show in the response.

0

Session object global variables

Global variables are allocated by the set up program. All environment variables and custom variables defined for the session object can be used in addition to predefined variables. Custom session variables can be defined, for example, through scripts, methods, or customizers.

NOTE: If a custom session variable is defined, it must be removed again afterward. Otherwise it remains for the rest of the session and, in certain circumstances, the wrong processes can be generated.

NOTE: New API methods to handle the global variables have been added to the /api path of the Application Server starting with One Identity Manager version 8.2. This allows to access the global variables even if the Application Server is restricted to the pure REST API only. For more information, see Running the Application Server in REST API only mode.

Related topics

Set global variable

To set a global variable, use the URL <baseURL>/api/variable/{name}

Table 8: Set global variable request

HTTP method

URI

Body

Put

<baseURL>/api/variable/{name}

{"value": <value>}

Table 9: Set global variable parameters

Parameter

Description

Parameter type

Data type

name

Variable name (required)

path

string

Body schema:

{value (object): Content of the variable.}

Example:

https://<Hostname>/AppServer/api/variable/FullSync

Body:

{"value": true}

Clear global variable

To clear a global variable, use the URL <baseURL>/api/variable/{name}

Table 10: Clear global variable request

HTTP method

URI

Body

Put

<baseURL>/api/variable/{name}

{"clear": true}

Table 11: Clear global variable parameters

Parameter

Description

Parameter type

Data type

name

Variable name (required)

path

string

Body schema:

{clear (boolean): True to clear a variable.}

Example:

https://<Hostname>/AppServer/api/variable/FullSync

Body:

{"clear": true}

Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen