What “alpha” means for v2
“Alpha” describes the coverage of v2, not the stability of its endpoints.- Every endpoint in this reference is final. Its path, parameters and response shape do not change in a breaking way. You can build production integrations on it.
- The set of endpoints is incomplete. We move the API to v2 endpoint by endpoint, not in one release. Each endpoint appears in this reference on the day it ships.
- An endpoint that is not in this reference is not in v2 yet. Use its v1 equivalent until it arrives.
Use v1 and v2 together
v1 stays available. One integration can call v1 and v2 endpoints side by side, with the same API key. See the v1 reference for the endpoints that v2 does not cover yet.Base URL
Authentication
v2 uses the samex-api-key header as v1. See Authentication.
Paths
A v2 path names the organization or project it acts on:Continue to send the
x-organisation-id or x-project-id header. Its value must match the ID in
the path. See Context Headers.Requests and responses
All requests and responses use JSON.Two kinds of list
Pagination
Offset-based, viapage and limit:
On a
GET list, send them in the query string:
POST analytics list, send them in the body:
nextPage is omitted on the last page, prevPage on the first.
Sorting
A sort is afield:asc or field:desc pair, as a string.
On a GET list, send one or more comma-separated pairs in the query string:
POST analytics list, send one pair in the body:
The v1 form, an array of
{ "field": ..., "direction": ... } objects, returns 400 on v2.Filtering
Filters are named parameters. On aGET list, a list filter takes either form:
POST analytics list, filters are properties of the body.