Skip to content

Recent measurements - Continuation

POST {baseUrl}/v2/recent-datasource-measurements-continuation
Continues a previous request for recent measurements. Returns a list of recent measurements in time descending order.

Example
url: https://clarity-data-api.clarity.io/v2/recent-datasource-measurements-continuation
body:

{
    org: "myorg1234",
    continuationToken: "GH2J6...a long continuation token...A2EW1"
}

Continuations

A common access pattern is to routinely poll to get any new measurements since the last time you asked. It is awkward to accomplish this using startTime on your requests. Due to race conditions it is possible that you could miss a measurement, or get the same measurement twice. To make this easier, this endpoint accepts continuation tokens.

Your first call uses the recent-datasource-measurements-query endpoint and adds the additional parameter: replyWithContinuationToken: true. The response will include an x-clarity-continuation-token in the header.

On subsequent calls, this endpoint accepts that continuation token. The continuation response will pick up from the last call, returning newer measurements (if any exist) for the same datasources requested in the first call. An updated continuation token will be returned as well. A continuation token is good for 24 hours after it is issued.

Note: If the original call was for allDatasources in the org, then the continuations will include/exclude datasources as they are subscribed/unsubscribed.

Request Headers

parameter description
x-api-key string The API key string.
Accept-Encoding string Encoding options, gzip is supported to compress data.

Note: We strongly recommend including it in the headers to reduce response payload size.

Example: Accept-Encoding: gzip

Request

body parameter description
org string
required
Find the org ID by clicking on your user icon in Dashboard.
Example org ID: "myorgVD43"
continuationToken string the token returned by the previous call

Response Headers

parameter description
x-clarity-continuation-token string An updated continuation token

Response

see recent datasource measurement response formats