API Udianas doc

Lists

Some API methods return lists of items: the list of species, the list of a person's trees, etc. A paging system is integrated.

By default, the number of elements per page is 20 and the page is the first page (1).

Two parameters can be passed to the query to display other data:

  • Page the number of the requested page (first page = 1)
  • Limite the maximum number of elements returned in a page

Example:

/Plantations?Limite=3&Page=2

If the Limit parameter is used in the method call, it must be used with the same value for all the calls which concern the display of the same list in order to avoid an inconsistency in the list.

The API does not save the last value used.

API response contains list specific data

{
  "NombreTotal": 8,
  "Page": 2,
  "NombreParPage": 3,
  "NombreDansLaPage": 3,
  "Plus": true,
  "Plantations": []
  // Other data has been removed for readability
}

The value of the Plus field is true if additional records exist. Be careful in very dynamic lists, new records can disrupt the mechanism of this simple pagination. If a dynamic paginated list is required, contact support.