Common API Parameters

Table 1. Query Time Frame Parameters
Parameter Description Valid Values Required?
start The start time of the query.
  • Timestamp in milliseconds in Unix Epoch format

    -or-

  • <value><unit>-ago (for example: 12h-ago; choose from ms, s, mi, h, d, w, mm, y)
Required
end The end time of the query.
  • Timestamp in milliseconds in Unix Epoch format

    -or-

  • <value><unit>-ago (for example: 12h-ago; choose from ms, s, mi, h, d, w, mm, y)
Optional; if not provided, the current time is considered
tags Contains the tag details. Required
name The name of the tag. Required
limit The maximum number of query results to return. Any number Optional
order The order of the query results
  • asc
  • desc
Optional (if not provided, the ascending order is considered)
Table 2. Tags Parameters
Parameter Description Valid Values Required?
tags Contains the tag details. Required
name The name of the tag. Required
limit The maximum number of query results to return. Any number Optional
order The order of the query results
  • asc
  • desc
Optional (if not provided, the ascending order is considered)
Table 3. Aggregation Parameters
Parameter Description Valid Values Required?
aggregations Contains calculation parameters. By default, aggregation is performed on good quality data only unless you specify otherwise in the filtering parameters. Optional
aggregations:type The type of the aggregation.
  • avg
  • sum
  • count
  • dev (for standard deviation)
  • gaps (to identify null values in data)
  • least_squares (to get the best-fit line)
  • max
  • min
  • trendmode (to get both max and min values)
  • div (to get the result of a division)
  • percentile
  • rate
  • sampler
  • scale
Required if aggregations is defined
aggregations:interval The time interval for which each aggregated value must be returned. For example, if you specify "interval": "1h", one value is returned each hour, beginning with the start time. <number><unit> Required if aggregations:count is not provided.
aggregations:count The number of aggregated values that you want to return. For example, if you specify "count":3, the result will contain 3 points evenly dispersed over the time window. Any number Required if aggregations:interval is not provided.
Table 4. Filtering Parameters
Parameter Description Valid Values Required?
filters Contains filter parameters Optional
filters:attributes Filters the results by arrays of the attribute host, metricName, or queryIndex. Optional
filters:measurements Filters the results based on a condition. Optional
filters:measurements:condition The condition used for filtering.
  • lt
  • gt
  • eq
  • le
  • ge
  • ne
Required if filters:measurements is defined.
filters:measurements:values The value for the filtering condition. For example, if you want only the data samples that are greater than 10, enter ge for condition and 10 for values Any number Required if filters:measurements is defined.
filters:qualities Filters query results based on the data quality. Optional (if not provided, only good quality is considered)
filters:qualities:value Filters query results based on the data quality.
  • 0 (for bad quality)
  • 3 (for good quality)
Required if filters:qualities is defined.
Table 5. Grouping Parameters
Parameter Description Valid Values Required?
groups Contains grouping parameters Optional
groups:name The name of the attribute using which you want to group the results. Required if groups is defined.
groups:values The values of the attribute using which you want to group the results. For example, if you want to group the results based on the host names, enter attribute for the name and host for the values parameters. Required if groups is defined.
groups:rangeSize The number of data samples to be placed in a group. For example, if you want 10 data samples in each group, enter measurement for the name and 10 for the rangeSize parameters. Required if groups is defined.
groups:rangeSize:groupCount The time range that you want to use while grouping. For example, if you want one-hour groups for data samples collected in a day, enter measurement, 1h, 24 for the name, rangeSize, and groupCount parameters, respectively. Required if groups is defined.