REST API considerations

You can use REST API to retrieve large amounts of data that is related to computer systems, software instances, and license usage in your environment. Such information can then be passed to other applications for further processing and analysis.

Although using single API requests to retrieve data only from a selected subset of computers does not greatly impact the performance of , this is not true when retrieving data in bulk for all your computer systems at the same time. Such an action requires the processing of large amounts of data and it always influences the application performance.

In general, the API requests should not be used together with other performance intensive tasks, like software scans or data imports. Each user that is logged in to the application, as well as the number of actions that are performed in the web user interface during the REST API calls also decrease the performance.
Important: Each time you want to retrieve data through REST API, ensure that the use of at a moderate level, so that the extra workload resulting from REST API does not overload the application and create performance problems.
When you retrieve data in bulk, you can also make several API requests and use the limit and offset parameters to paginate your results instead of retrieving all the data at the same time:
  • Use the limit parameter to specify the number of retrieved results:
    https://hostname:port/URL?token=token&countSwitch=1&limit=10000&offset=0
    For example:
    https://192.0.2.2:9081/api/sam/v2/computers?token=token&countSwitch=1&limit=10000&offset=0
  • If you limit the first request to 100 000 results, append the next request with the offset=100000 parameter to omit the records that you already retrieved:
    https://hostname:port/URL?token=token&countSwitch=1&limit=10000&offset=10000
    For example:
    https://192.0.2.2:9081/api/sam/v2/computers?token=token&countSwitch=1&limit=10000&offset=10000
Note: The limit and offset parameters can be omitted if you are retrieving data from up to about 50 endpoints. For environments with approximately 200 000 endpoints, you are advised to retrieve data in pages of 100 000 rows for computer systems, 200 000 rows for software instances, and 300 000 rows for license usage.