Metrics Engine REST API Reference

UnboundID Logo

/metrics/{metricId}/datatable

GET

Available Since: 3.6

Query a metric with the given parameters and return the results as a DataTable.

Parameters

name description type default
metricId The ID of the metric to query. path
instanceType The product instance types to match. If not specified all instance types are matched. To match more than one instance type, specify this parameter multiple times. A list of valid instance types will be returned in an error message if an invalid value is provided. query
instanceGroup The product instance groups to match. If not specified all instance groups are matched. This parameter is currently not implemented. query
instanceLocation The product instance locations to match. If not specified all instance locations are matched. To match more than one location, specify this parameter multiple times. Valid locations are contained in the location attribute of the result from resource InstancesResource. query
instanceHostname The product instance hostnames to match. If not specified all instance hostnames are matched. To matched more than one hostname, specify this parameter multiple times. Valid hostnames are contained in the hostname attribute of the result from resource InstancesResource. query
instanceVersion The product instance versions to match or null to match all instance versions. Valid version strings are contained in the version attribute of the result from resource InstancesResource. query
instance The specific product instance IDs to match. If not specified all instances are used. Valid instance IDs are contained in the id attribute of the result from resource InstancesResource. query
startTime The start time for the requested data. This value may be in a relative form which will be calculated relative to endTime, or it may be in an absolute form using ISO8601 format. Relative form uses the syntax: -N[mhdwMy] which is interpreted to mean N time-units before endTime. Absolute form uses the ISO8601 syntax of

YYYY-MM-DDThh:mm:ss

where you can specify a partial date by omitting fields on the right (without skipping any fields). For example, 2013-01-01 is a valid timestamp that mean midnight on January 1st 2013.

query -24h
endTime The end time for the requested data. If not specified, an endTime of 'now' is used. This value may be in a relative form which will be calculated relative to now, or it may be in an absolute form using ISO8601 format. Relative form uses the syntax: -N[mhdwMy] which is interpreted to mean N time-units before now where now is the current time on the Metrics Engine server. Absolute form uses the ISO8601 syntax of

YYYY-MM-DDThh:mm:ss

where you can specify a partial string by omitting fields on the right (without skipping any fields). For example, 2013-01-01 is a valid timestamp that mean midnight on January 1st 2013.

query
maxIntervals The maximum number of time intervals to include in the result. If maxIntervals is 1, all data over the requested time range is reduced to a single number. Otherwise the time range is evenly divided into maxIntervals intervals. A time range farther in the past will be forced to use data with less time granularity, so it is possible that the resulting chart will have fewer than maxIntervals data points, but it will never have more. query 1
maxTruncatedIntervals The maximum number of incomplete time intervals to truncate, if any. If null, a max of 5 min worth of intervals or 20% of the total intervals may be truncated. query
statistic The statistic to query on. If not specified, the default statistic (count for CountMetrics or average or all others) will be used. For count-valued metrics, the statistic specification may include a rate conversion as follows:

statistic=count;per:s   Count per Second

statistic=count;per:m   Count per Minute

statistic=count;per:h   Count per Hour

Valid statistic values are contained in the statistic attribute of the result from resource MetricResource.

query
dimension Filter the results to only include data related to the specified Dimension/value pairs. If not specified, all dimension values for all dimensions of the metric will be present in the chart. A valid dimension filter is specified as:

dimension=application-name:SSO Application,ERP Application

All values for a dimension must be provided in the same query parameter. To filter on more than one dimension, use more than one query parameter.

Valid dimension names and values are contained in the dimensions attribute of the result from resource MetricResource.

query
pivot When specified a pivot will separate the metric along distinct dimension values. If not specified, all dimension values are aggregated together. A valid pivot name for a metric includes all of the metrics dimensions plus 'instance'. Pivot by instance will separate the values by monitored server. Histogram-valued metrics may also have 'histogram' as a valid pivot, which will split the result by histogram bucket.

Valid dimension names are contained in the dimensions attribute of the result from resource MetricResource.

query
hint Query hints to use. Must be one of the following values:
  • MOST_CURRENT - use the most current data that fits the range
  • AGGREGATE_REQUIRES_ALL - every point in the results requires data from all sub-series.
query
tqx A set of colon-delimited key/value pairs for standard or custom parameters of the Google Datasource protocol. query
tz The timezone to use. query GMT
topN when specified the data series returned by the metric query are further filtered to include only the top/bottom series as sorted by average series value. If the value is greater than 0, the series with the highest averages are returned. If the value is less than 0, the series with the lowest averages are returned. Only series with an average greater than 0 are included; query 0
includeEmptySeries Whether to include empty series on the chart. query false

Response Body

element: (custom)
media types: */*
application/xml
application/javascript
image/jpeg
image/png
text/csv
text/tab-separated-values
text/html

The DataTableResponse containing the result.

Status Codes

code description
200 Success
400 Invalid parameter
500 Internal error
404 Metric not found