# Parameters

 

# 1 Pagination

All top-level API resources support batch fetches via the GET method. We don't return every existing records by default for the sake of performance. Resources are splitted into page cursors via page parameter and limited to a bulk size using a per_page parameter. A collection of pagination metadata will be provided in association with data.

Pages

  • You need to iterate over all pages to retrieve complete dataset.
  • The maximum value of per_page is a 1000. A higher value will return at most a 1000 objects.

# 2 The Metadata object

Metadata Type Description
total integer Complete number of objects available in datastore.
page_total integer Number of objects in the current page.
pages integer Number of pages with applied per_page limit.
per_page integer Limit the number of objects returned by a page.
current_page integer The current active page (default to first).
next_page integer The next page number (false if none).
previous_page integer The previous page number (false if none).
first_page boolean If current page is first page (or not).
last_page boolean If current page is last page (or not).
out_of_range boolean If current page is out of range (does not exists within current parameters).

# 3 Basic parameters

The most frequently used request parameter is page, to specify the cursor in the bulk data pagination you want to fetch. Basic parameters can be provided both a JSON payload or an URL parameter.

# JSON payload example

GET https://api.gestal.cloud/integration/sows 'Payload: JSON <{page=3}>'

# URL parameter example

GET https://api.gestal.cloud/integration/sows?page=3

Empty parameters

When unspecified, values page=1 and per_page=100 will be used by default.

# 3 Valid operators

In order to reduce the amount of data returned by the API, all endpoints support basic request parameters. Common operators are used to specify conditions on any attribute of any resource. Multiple conditions to the same field can be specified using the slash / or semicolon ; to separate values.

Operator Description
; Separator when specifying multiple conditions for the same parameter with AND relationship. / is also accepted.
| Separator when specifying multiple conditions for the same parameter with OR relationship.
= Equals. Default when no operator is specified. == is also accepted.
!= Different than. <> is also accepted.
< Less than.
> Greater than.
<= Less than or equals.
>= Greater than or equals.

Space character

There should be no space in the condition, unless the condition value is a string containing a space.

Value separator

The semicolon ';' is only accepted when providing parameters as a JSON payload. When using simple URL parameters, only the slash / is working.

# Example of basic parameters as JSON payload

GET https://api.gestal.cloud/feed-intakes 'Payload: JSON <parameters>'

Where parameters is the following JSON object:

{
  "fed_at": ">=2018-01-01T00:00:00.000Z;<2018-01-02T00:00:00.000",
  "quantity": 0
}

Or a URL parameters

GET https://api.gestal.cloud/feed-intakes?fed_at=>=2018-01-01T00:00:00.000Z/<2018-01-02T00:00:00.000&quantity=0
Last Updated: 8/27/2025, 2:40:38 PM