These operations stay available. Asset-centric identifiers on these operations are deprecated. Identify the resource with an instance ID (
space and externalId) instead.See Deprecated and retired features for dates, and Data modeling status for CDF projects for how DATA_MODELING_ONLY and HYBRID projects behave while you upgrade.Data points
A data point is a piece of information associated with a specific time, stored as a numeric, string, or state value. Timestamps are defined in milliseconds in Unix Epoch time. Fractional milliseconds are not supported, and leap seconds are not counted. Each data point can have a status code that describes its quality. There are three categories:Good, Uncertain, and Bad. By default, only Good data points are returned, but you can opt in to receive all data points. For more information, see Status codes.
Time series types
Time series in CDF are numeric, string, or state. The type determines which values the data points hold, how CDF interpolates between them, and which aggregates you can request. To compare the types and choose one, see About time series types.Create time series
Create time series asCogniteTimeSeries instances with the Instances API. See Time series in data modeling for detailed instructions.
Identify time series
In data point requests, identify a time series by itsinstanceId: an object with the space and externalId of the CogniteTimeSeries instance.
Retrieve data points
Retrieve data points for one or more time series withPOST /timeseries/data/list.
Example: retrieve data points
Example: retrieve data points
Retrieve aggregates
To visualize or analyze a longer period, you can extract aggregate values between two points in time. For the available aggregates and how CDF calculates them, see Aggregation.Example: hourly average aggregates
Example: hourly average aggregates
To return the hourly average aggregate with a granularity of 1 hour, for the last 5 hours:
Best practices
Use these tips to increase throughput and query performance.Message size and batching
Send many data points from the same time series in the same request. If you have room for more data points in the request, you can add more time series. Preferred batch sizes are up to 100k numeric data points or 10-100k string data points, depending on the string length (around 1 MB is good). For each time series, group the data points in time. Ideally, different requests shouldn’t have overlapping time series ranges. If data changes, update existing ranges.Error handling
For general guidance on handling429 Too Many Requests responses, exponential backoff, and retry strategies, see API rate limits.
If you receive repeated 500 Internal Server Error responses, you may have found a bug. Contact support@cognite.com and include the request ID from the error message.
Retries and idempotency
Most API endpoints, including all data point requests, are idempotent. You can send the same request several times without any effect beyond the first request. When you modify or delete time series, subsequent requests can fail harmlessly if the references have become invalid.CDF always applies the complete request or nothing at all. A 200 response indicates that the complete request was applied.