API Documentation
/
No Results Found
Pagination

Pagination

When working with listing APIs (such as list users, list groups, or list departments), the API may need to return a large number of records. Retrieving all of this data at once can be inefficient, slow, and resource-heavy.

To improve performance, ADManager Plus uses pagination, a technique that divides large datasets into smaller, more manageable chunks (or pages). Pagination helps by:

  • Reducing the amount of data transferred in a single request.
  • Improving response times.
  • Allowing clients to request data in smaller, controlled batches.

This approach is especially useful for APIs that return hundreds or thousands of records, ensuring smooth performance without overwhelming the server or the client application.

Offset pagination

Offset pagination is a simple and widely used technique. The client retrieves a subset of data by specifying the starting index (from) and the number of records to return (limit). This method is ideal for static or moderately changing datasets, where the underlying data does not change frequently during pagination.

When using offset pagination, the client specifies two parameters in the API request:

Parameter Description
from The index of the starting object to retrieve . The default starting index is 1.
limit The number of individual objects returned in each request . The default (and maximum) value is 100.

Request Example

Click to copy
http://admanagerplus:8080/api/v2/users?from=1&limit=100

Response Example

{ "data": [], "meta": { "start_index": "1", "limit": 100, "total_no_of_objects": 7 } }