Skip to main content
POST
/
timeseries
/
data
/
latest
JavaScript SDK
const datapoints = await client.datapoints.retrieveLatest([
  {
   before: 'now',
   id: 123
 },
 {
   externalId: 'abc',
   before: new Date('21 jan 2018'),
 }
]);
{
  "items": [
    {
      "id": 4503599627370496,
      "isString": true,
      "type": "<string>",
      "datapoints": [
        {
          "timestamp": 1638795554528,
          "value": 123,
          "status": {
            "code": 123,
            "symbol": "<string>"
          }
        }
      ],
      "externalId": "<string>",
      "instanceId": {
        "space": "<string>",
        "externalId": "<string>"
      },
      "isStep": true,
      "unit": "<string>",
      "unitExternalId": "<string>",
      "nextCursor": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Body

application/json

The list of the queries to perform.

items
(QueryWithInternalId · object | QueryWithExternalId · object | QueryWithInstanceId · object)[]
required

List of latest queries

Required array length: 1 - 100 elements

Describes the latest query.

ignoreUnknownIds
boolean
default:false

Ignore IDs and external IDs that are not found

Response

A list of responses. Each response contains a list with the most recent data point or an empty list if no data points are found.

The list of responses. The order matches the requests order.

items
object[]
required
Last modified on April 23, 2026