What is the syntax to return more than the default of 50 items when using the REST API query?
After logging into the KACE via REST, i then do an inventory request with the following URL:
https://<kace>.com/api/inventory/machines
I need to know the REST API syntax for querying more machines than the default of 50?
I have tried the different API formats: page_size, size, etc... and none of them work. I am also unable to find this parameter in the Admin documents.
Any help would be greatly beneficial.
Thank you
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
gwir
6 years ago
Paging
To apply paging, use the paging query parameter.
To limit the number of records returned, use the limit parameter. For example:
/machines?paging=limit 100
To indicate the index of the first returned record, use theoffset parameter. For example:
/machines?offset 101
To use these parameters together, separate them with a space:
/machines?offset 101 limit 100
These two values are useful for consumers that display the records in a paged format. The values can appear in
either order.
If no limit is specified, the default is 50. To force the server to return every record, set the limit to zero '0' or ALL.
For example:
/machines?paging=limit ALL
If no offset is given, the default is zero '0'.
To apply paging, use the paging query parameter.
To limit the number of records returned, use the limit parameter. For example:
/machines?paging=limit 100
To indicate the index of the first returned record, use theoffset parameter. For example:
/machines?offset 101
To use these parameters together, separate them with a space:
/machines?offset 101 limit 100
These two values are useful for consumers that display the records in a paged format. The values can appear in
either order.
If no limit is specified, the default is 50. To force the server to return every record, set the limit to zero '0' or ALL.
For example:
/machines?paging=limit ALL
If no offset is given, the default is zero '0'.
Have a nice day!
Comments:
-
Thank you for your assistance. That was very helpful. - Antmanarmy 6 years ago
-
No problem - gwir 6 years ago