Pagination

<< Click to Display Table of Contents >>

Navigation:  Soprano APIs, Plugins & Interfaces > REST API Interface Overview >

Pagination

Previous pageReturn to chapter overviewNext page

While running a search for a specific resource on the REST interface, the returned responses may be large, making them hard to handle. This is where 'Pagination' comes in. It allows you to limit the number of records that are returned in each request. The default limit on the result is set as '50' and it can be modified and reset as per your requirements.

 

NOTE:

The use of pagination parameters is optional. It can be used only with GET requests.

 

Parameter

Type

Default

Description

index

Integer

1

Page number

limit

Integer

50

Page size - the maximum number of records to be returned within one request

 

 

The search with pagination parameters can be run for Messages, Contacts, Groups and Lists.

For example, URL to retrieve first '50' contacts (default value for pagination result is 50) -

 

GET https://apac.soprano.com.au/rest/contacts

 

URL to retrieve first '20' contacts -

 

GET https://apac.soprano.com.au/rest/contacts?index=1&limit=20

 

URL to retrieve next '10' contacts -

 

GET https://apac.soprano.com.au/rest/contacts?index=2&limit=10

 

URL to retrieve the second block of '10' SMS messages -

 

GET https://apac.soprano.com.au/rest/messages/sms?index=2&limit=10

Please note: A license may be required in order to view or use the above features.