interface LoggingDataQuery {
    decimals?: number;
    extendedBoundary?: boolean;
    factor?: number;
    from?: string;
    limit?: number;
    offset?: number;
    order?: "desc" | "asc";
    postAggr?: Aggregrator;
    postTransform?: null | "difference";
    preAggr?: Aggregrator;
    ref?: string;
    selector?: string;
    step?: number;
    tag?: null | {
        publicId: string;
    };
    to?: string;
    unit?: string;
    variable?: null | {
        publicId: string;
    };
}

Properties

decimals?: number

Number of decimals to be returned

extendedBoundary?: boolean

Whether or not you want to query for extra data-points, one before the start date and one beyond the end date (if they exist).

factor?: number

The factor to multiply the value by

from?: string

Used to override the global time-range for this specific query

For example 2019-01-01T00:00:00Z

limit?: number

How many values should be fetched. The postAggr is applied to reduce the set of points to the limit.

offset?: number

Starting point for returned values

Must be null if postAggr is set

order?: "desc" | "asc"

The order to order datapoints by

postAggr?: Aggregrator

Aggregrator for aggregation after data storage

Must be null if offset is set

postTransform?: null | "difference"

Apply a transform. Only applies when postAggr is 'last'.

'difference' takes the difference between the last value in a bucket and the bucket before it.

preAggr?: Aggregrator

When omitted, the pre-aggregator is determined automatically based on a couple of factors, but in most cases it defaults to "raw".

ref?: string

Reference to identify the value by. If this is not set, a unique reference is generated.

selector?: string

The selector for getting data from a specific tag or variable. Can be used instead of tag or variable field

Formatted as .. where is the name of the datas source, is 'tag' or 'variable' and is the slug of the tag or variable.

step?: number

Number of seconds between subsequent data-points

tag?: null | {
    publicId: string;
}

The tag to fetch the data from. Must be null if variable is set

Type declaration

  • publicId: string
to?: string

Used to override the global time-range for this specific query

For example 2019-01-01T23:59:59Z

unit?: string

The unit of the value

variable?: null | {
    publicId: string;
}

The variable to fetch the data from. Must be null if tag is set

Type declaration

  • publicId: string