Timeseries API v1 - GET list of metrics
We have a new version of this API—Metrics API v2. Check it out!
Lists all metric definitions, along with parameters of each metric available within your environment.
The full list can be lengthy, but you can narrow it down by specifying filter parameters such as the source of the metric. See the Parameters expandable section for more details.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v1/timeseries |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v1/timeseries | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v1/timeseries |
Authentication
To execute this request, you need an access token with DataExport
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
source | string | The type of the metric, such as BUILTIN or CUSTOM.
| query | optional |
detailedSource | string | The feature where metrics originates, such as Synthetic or RUM. | query | optional |
Possible values for the detailedSource
element:
You can find allowed values for the detailedSource
element in the subheadings of the Built-in metrics and Plugin metrics sections of the available metrics pages for SaaS and Managed. Use them exactly as in headings—spaces included.
Response
The result is JSON containing the array of objects, with each object representing a metric.
Response codes
Code | Type | Description |
---|---|---|
200 | TimeseriesDefinition[] | Success |
Response body objects
The ResponseBody
object
The TimeseriesDefinition
object
The configuration of a metric with all its parameters.
Element | Type | Description |
---|---|---|
aggregationTypes | string[] | The list of allowed aggregations for this metric.
|
detailedSource | string | The feature, where the metric originates. |
dimensions | string[] | The fine metric division, for example process group and process ID for some process-related metric. |
displayName | string | The name of the metric in the user interface. |
filter | string | The feature, where the metric originates.
|
pluginId | string | The ID of the plugin, where the metric originates. |
timeseriesId | string | The ID of the metric. |
types | string[] | Technology type definition. Used to group metrics under a logical technology name. |
unit | string | The unit of the metric.
|
warnings | string[] | The warnings that occurred while creating the metric. |
Response body JSON model
1[2 {3 "aggregationTypes": [4 "AVG",5 "SUM",6 "MIN",7 "MAX"8 ],9 "detailedSource": "Infrastructure",10 "dimensions": [11 "HOST"12 ],13 "displayName": "CPU idle",14 "filter": "BUILTIN",15 "timeseriesId": "com.dynatrace.builting:host.cpu.idle",16 "types": [17 "Test"18 ],19 "unit": "Percent",20 "warnings": []21 }22]
Example
In this example, the request lists the metric of the PLUGIN type, where the detailed source is PHP-FPM.
The API token is passed in the Authorization header.
The result is truncated to two entries.
Curl
1curl -X GET \2 'https://mySampleEnv.live.dynatrace.com/api/v1/timeseries?source=plugin&detailedsource=PHP-FPM' \3 -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
Request URL
1https://mySampleEnv.live.dynatrace.com/api/v1/timeseries?api-token&source=plugin&detailedsource=PHP-FPM
Response content
1[2 {3 "timeseriesId": "beta.python.phpfpm.dev:accepted conn",4 "displayName": "accepted conn",5 "dimensions": [6 "PROCESS_GROUP_INSTANCE",7 "pool"8 ],9 "aggregationTypes": [10 "AVG",11 "SUM",12 "MIN",13 "MAX"14 ],15 "unit": "Count (count)",16 "filter": "PLUGIN",17 "detailedSource": "PHP-FPM",18 "pluginId": "beta.python.phpfpm.dev",19 "types": []20 },21 {22 "timeseriesId": "beta.python.phpfpm.dev:active processes",23 "displayName": "active processes",24 "dimensions": [25 "PROCESS_GROUP_INSTANCE",26 "pool"27 ],28 "aggregationTypes": [29 "AVG",30 "SUM",31 "MIN",32 "MAX"33 ],34 "unit": "Count (count)",35 "filter": "PLUGIN",36 "detailedSource": "PHP-FPM",37 "pluginId": "beta.python.phpfpm.dev",38 "types": []39 }40]
Response code
200
Process types
The list of known process types we monitor with Dynatrace is continuously growing. If you don't see the process type you want in the list below, please refer to the Dynatrace processes page to see whether the process is included there.
|
|
|
|
OS types
The list of known operating systems that we monitor with Dynatrace is continuously growing. If you don't see the OS type you want listed below, please refer to the Dynatrace hosts page to see whether the OS type is included there.
|
|
Service types
|
|
Technology types
|
|
Aggregation types
|
|