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

  • Agents: View, edit, run and delete agents.
  • Events: View events and related metadata.
  • Diagrams: Download diagrammatic representation of stories.
  • Stories: View and export stories.
  • Admin: Coming soon

Accessing the API

The REST API takes the form of the following URL:

https://<tenant-name>.tines.io/api/<api-version>/<api-endpoint>

Pagination

Requests that return multiple items, e.g.: events and agents, 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://<tenant-name>.tines.io/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).
  • per_page: The number of items returned per page.
  • 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://<tenant-name>.tines.io/api/v1/agents?page=1&per_page=20",
        "previous_page": null,
        "next_page": "https://<tenant-name>.tines.io/api/v1/agents?page=2&per_page=20",
        "per_page": 20,
        "pages": 13,
        "count": 242
    }
}