Welcome

Accessing the API

The REST API exposes a number of endpoints providing programmatic access to Tines data and functionality.

Pagination

Requests that return multiple items, e.g.: events and actions, will be paginated to 20 items by default. You can specify further pages with the ?page parameter. In addition, you can set a custom page size with the ?per_page parameter.

curl 'https://<<META.tenant.domain>>/api/v1/events?page=2&per_page=100'

The 'meta' object

When pagination of items occurs, an object named "meta" will be included in the response body. This object contains the following information:

  • current_page: A link to the current page of results.
  • previous_page: A link to the previous page of results (if available).
  • next_page: A link to the next page of results (if available).
  • next_page_number: The next page number to facilitate easier navigation through the results.
  • per_page: The number of items returned per page (defaults to 20, maximum is 500).
  • pages: The number of pages available.
  • count: The total number of items returned by the request.

A sample response including the meta object is shown below:

{
    "agents": [...],
    "meta": {
        "current_page": "https://<<META.tenant.domain>>/api/v1/agents?page=1&per_page=20",
        "previous_page": null,
        "next_page": "https://<<META.tenant.domain>>/api/v1/agents?page=2&per_page=20",
        "next_page_number": 2,
        "per_page": 20,
        "pages": 13,
        "count": 242
    }
}

HTTP Status codes

You can configure your clients to treat the HTTP Responses Codes returned by Tines API as follows:

  • Treat 200–299 as success
  • Treat 400–499 as client request errors
  • Treat 500–599 as Tines server errors

Most 400-level errors and some 500-level errors will include a body in the response containing more information about why the error was returned.

Was this helpful?