Interface LatestDataBeforeRequestId

Addressing time series by internal id is deprecated 2026-10-15 and retired 2027-12-31, use LatestDataBeforeRequestInstanceId instead. Will be removed in next major release. See https://github.com/cognitedata/cognite-sdk-js/blob/master/guides/DEPRECATIONS.md#datapoints-identify-time-series-by-instanceid.

interface LatestDataBeforeRequestId {
    before?: string | number | Date;
    id: number;
    ignoreBadDataPoints?: boolean;
    includeStatus?: boolean;
    targetUnit?: string;
    targetUnitSystem?: string;
    treatUncertainAsBad?: boolean;
}

Hierarchy (view full)

Properties

before?: string | number | Date

Get first datapoint before this time. Format is N[timeunit]-ago where timeunit is w,d,h,m,s. Example: '2d-ago' will get everything that is up to 2 days old. Can also send time as a Date object or number of milliseconds since epoch.

id: number
ignoreBadDataPoints?: boolean

Treat data points with Bad status codes as if they do not exist. Set to false to include bad data points.

true
includeStatus?: boolean

Include status codes in the response. Good (code 0) status codes are always omitted.

false
targetUnit?: string

The unit externalId of the data points returned. If the time series does not have a unitExternalId that can be converted to the targetUnit, an error will be returned. Cannot be used with targetUnitSystem.

targetUnitSystem?: string

The unit system of the data points returned. Cannot be used with targetUnit.

treatUncertainAsBad?: boolean

Treat data points with Uncertain status codes as Bad.

true