query.analytics

Analytics query

type

object

properties

  • templateId

The id of the template to use for this file

type

string

  • templateVariables

The variables and their values to be replaced from the template

type

object

additionalProperties

  • variablesFiles

The variables files to use to replace the variables. The first file of the list will take precedence over the following one. Template variables take precedence over the contents of the files.

type

array

items

type

string

  • isTemplateGeneratedByOspComposer

If the value is set to true, manual editing of this file should be avoided, as the composer will override the value in the next generation.

type

boolean

  • moduleId

The id of the analytics module to attach this query to

type

string

  • query

Expression that represents the data to fetch.

QueryEntity

additionalProperties

False

QueryEntity

type

object

properties

  • collection

The name of the collection

type

string

  • range

Time period of the query

default

start

value

60

unit

SECONDS

QueryRangeConfigurationEntity

  • measurements

List of measurements we want to get

type

array

items

type

string

  • fields

List of fields we want to get

type

array

items

type

string

  • limit

Set limit number of results

QueryLimitConfigurationEntity

  • aggregate

Define a aggregation function

QueryAggregateConfigurationEntity

  • additionalStages

List of additional stages to add at the end of the query

type

array

items

type

string

additionalProperties

False

QueryRangeConfigurationEntity

type

object

properties

  • start

Start

DurationConfigurationEntity

  • end

End

DurationConfigurationEntity

additionalProperties

False

DurationConfigurationEntity

type

object

properties

  • value

The amount of time expressed with the unit

type

integer

  • unit

The unit of time expressed with the value

type

string

enum

NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS

additionalProperties

False

QueryLimitConfigurationEntity

type

object

properties

  • limit

Limit number of results

type

integer

  • offset

Offset

type

integer

  • from

Takes the x results from the first or the last value (default value).

type

string

enum

First, Last

default

Last

additionalProperties

False

QueryAggregateConfigurationEntity

type

object

properties

  • every

Aggregation window (default is 1h).

default

value

1

unit

HOURS

DurationConfigurationEntity

  • fn

Aggregation function (mean as default).

type

string

enum

count, integral, last, mean, median, min, max

default

mean

additionalProperties

False