interface DatapointsQueryExternalId {
    aggregates?: Aggregate[];
    cursor?: string;
    end?: string | Timestamp;
    externalId: string;
    granularity?: string;
    ignoreBadDataPoints?: boolean;
    includeOutsidePoints?: boolean;
    includeStatus?: boolean;
    limit?: number;
    start?: string | Timestamp;
    targetUnit?: string;
    targetUnitSystem?: string;
    timeZone?: string;
    treatUncertainAsBad?: boolean;
}

Hierarchy (view full)

Properties

aggregates?: Aggregate[]

The aggregates to be returned. This value overrides top-level default aggregates list when set. Specify all aggregates to be retrieved here. Specify empty array if this sub-query needs to return datapoints without aggregation.

cursor?: string
end?: string | Timestamp

Get datapoints up to this time. Same format as for start. Note that when using aggregates, the end will be rounded up such that the last aggregate represents a full aggregation interval containing the original end, where the interval is the granularity unit times the granularity multiplier. For granularity 2d, the aggregation interval is 2 days, if end was originally 3 days after the start, it will be rounded to 4 days after the start.

externalId: string
granularity?: string

The granularity size and granularity of the aggregates (2h)

ignoreBadDataPoints?: boolean

denotes that the API should return bad data points. Because the API treats uncertain data points as bad by default, this parameter includes both uncertain and bad data points.

includeOutsidePoints?: boolean

Whether to include the last datapoint before the requested time period,and the first one after the requested period. This can be useful for interpolating data. Not available for aggregates.

includeStatus?: boolean

denotes that the status of the data point should be included in the response.

limit?: number
start?: string | Timestamp

Get datapoints after 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 in Date object. Note that when using aggregates, the start time will be rounded down to a whole granularity unit (in UTC timezone). For granularity 2d it will be rounded to 0:00 AM on the same day, for 3h it will be rounded to the start of the hour, etc.

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.

timeZone?: string

Default: "UTC" Which time zone to align aggregates to. Omit to use top-level value.

treatUncertainAsBad?: boolean

returns data points marked with the uncertain status code. The default behavior of the API is to treat them the same as bad data points and don't returned them.