Get a list of sessions

Get a list of sessions from Spaces managed by the user associated with your API key

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
integer
≥ 1
Defaults to 1

(Optional) - The page number of the items to return. The number of items in a page is controlled by the pageSize parameter.

integer
1 to 100
Defaults to 25

(Optional) - The max number of items to return. Setting a larger pageSize will default to 100 spaces.

string

Filter sessions using a Base64-encoded JSON object.

Omit filters when you do not want to supply filter criteria.

Choose the fields below, serialize the object to JSON, and Base64-encode the UTF-8 bytes. Enter the encoded value in the filters input. These fields belong inside the JSON object; they are not separate query parameters.

Decoded filter fields

FieldTypeDescription
spaceIdsarray of stringsThe ids associated with the object in the filter. Each item: mongodb id (12 byte hex string). Example: ["507f1f77bcf86cd799439011"].
createdStartstringThe time range associated with filtering the object by its created date (start). Format: RFC3339 timestamp with mandatory time zone offset - e.g., YYYY-mm-ddTHH:MM:ss+00:00. Example: "2099-01-12T00:00:00.000+00:00".
createdEndstringThe time range associated with filtering the object by its created date (end). Format: RFC3339 timestamp with mandatory time zone offset - e.g., YYYY-mm-ddTHH:MM:ss+00:00. Example: "2099-01-12T00:00:00.000+00:00".
editedStartstringThe time range associated with filtering the object by its last edited date (start). Format: RFC3339 timestamp with mandatory time zone offset - e.g., YYYY-mm-ddTHH:MM:ss+00:00. Example: "2099-01-12T00:00:00.000+00:00".
editedEndstringThe time range associated with filtering the object by its last edited date (end). Format: RFC3339 timestamp with mandatory time zone offset - e.g., YYYY-mm-ddTHH:MM:ss+00:00. Example: "2099-01-12T00:00:00.000+00:00".
statusstringFilters the sessions by status. If not specified, only processed sessions are returned by default. Allowed values: inprogress, processed. Example: "inprogress".
callsOnlybooleanFilters sessions to only return sessions with calls Example: true.
billedOnlybooleanFilters sessions to only return sessions with billed Space time Example: true.

Example before encoding

{
  "status": "processed",
  "callsOnly": true
}

Base64 value for the filters input

eyJzdGF0dXMiOiJwcm9jZXNzZWQiLCJjYWxsc09ubHkiOnRydWV9

Example request

/analytics/sessions?filters=eyJzdGF0dXMiOiJwcm9jZXNzZWQiLCJjYWxsc09ubHkiOnRydWV9

Encode inline in Node.js

const criteria = {"status":"processed","callsOnly":true};
const params = new URLSearchParams({
  filters: Buffer.from(JSON.stringify(criteria), "utf8").toString("base64")
});
const path = "/analytics/sessions?" + params.toString();

Base64 encoding and URL encoding are separate steps. An HTTP client query-parameter helper can URL-encode the Base64 value for you. If constructing the URL manually, URL-encode the value once so +, /, and = are preserved.

Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json