Timeseries API - GET definition of a metric
Gets the definition of the specified metric.
The request produces an application/json
payload.
GET |
|
Parameters
To get a definition of the metric but not its data points, set the includeData parameter to false
.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
timeseriesId | string | Case-sensitive ID of the metric from which you want to read parameters. You can execute a GET metric definitions request to obtain the list of available metrics. |
path | required |
includeData | boolean | Flag to include data points to the response. Set to false to obtain just the definition of the metric. |
query | optional |
Response format
The result is a JSON object that contains metric parameters. The TimeseriesDataPointQueryResult
object is omitted in this case.
The TimeseriesQueryResult object
The configuration of a metric with all its parameters and, optionally, data points.
Element | Type | Description |
---|---|---|
timeseriesId | string | The ID of the metric. |
displayName | string | The name of the metric in the user interface. |
dimensions | string[] | The fine metric division, for example process group and process ID for some process-related metric. |
unit | string | The unit of the metric. |
detailedSource | string | The feature, where the metric originates. |
pluginId | string | The ID of the plugin, where the metric originates. |
types | string[] | Technology type definition. Used to group metrics under a logical technology name. |
dataResult | TimeseriesDataPointQueryResult | |
aggregationTypes | string[] | The list of allowed aggregations for this metric. |
filter | string | The feature, where the metric originates. |
The TimeseriesDataPointQueryResult object
List of metric's datapoints, as well as their parameters.
Element | Type | Description |
---|---|---|
dataPoints | object | Data points of a metric. A JSON object that maps the ID of the entity that delivered the data points and an array, which consists of arrays of the data point float values. May contain more than one entity ID per record (for example, a host and its network interface). In such cases, entity IDs are separated by commas. A datapoint contains a value and a timestamp, at which the value was recorded. DESK stores data in time slots. The dataPoints object shows the starting timestamp of the slot. If the startTimestamp or endTimestamp of your query lies inside of the data time slot, this time slot is included into response. Due to the fact that the timestamp of the first data point lies outside of the specified timeframe, you will see earlier timestamp than the specified startTimestamp in the first data point of the response. There are three versions of data points:
|
unit | string | The unit of data points. |
resolutionInMillisUTC | integer | The resolution of data points. |
aggregationType | string | The type of data points aggregation. |
entities | object | The list of entities where the data points originate. A JSON object that maps the entity ID in DESK and the actual name of the entity. |
timeseriesId | string | The ID of the metric. |
{
"timeseriesId": "com.DESK.builtin:host.cpu.idle",
"displayName": "CPU idle",
"dimensions": [
"HOST"
],
"allowedAggregationTypes": [
"AVG",
"SUM",
"MIN",
"MAX"
],
"unit": "Percent",
"configSource": "BUILTIN",
"detailedSource": "Infrastructure",
"types": [],
"dataResult": {
"dataPoints": {
"HOST-0000000000000007": [
[
1522220334000,
89
]
]
},
"externalTimeseriesId": "com.DESK.builtin:host.cpu.idle",
"unit": "Percent",
"entities": {
"HOST-0000000000000007": "Laptop-8"
},
"resolutionInMillisUTC": 300000,
"aggregationType": "AVG"
}
}
Example
In this example, the request asks for the definition of the Actions per session (com.DESK.builtin:app.actionspersession
) metric.
The API token is passed in the Authorization header.
Curl
curl -X GET \
https://mySampleEnv.live.dexp.ae/api/v1/timeseries/com.DESK.builtin:app.actionspersession?includeData=false \
-H 'Authorization: Api-Token abcdefjhij1234567890'
Request URL
https://mySampleEnv.live.dexp.ae/api/v1/timeseries/com.DESK.builtin:app.actionspersession?includeData=false
Response content
{
"timeseriesId": "com.DESK.builtin:app.actionspersession",
"displayName": "Actions per session",
"dimensions": [
"APPLICATION"
],
"unit": "PerMinute (count/min)",
"detailedSource": "Web application",
"types": [],
"aggregationTypes": [
"AVG"
],
"filter": "BUILTIN"
}
Response code
200