Metrics API - GET all metrics

Lists all available metrics.

  • To list only metric keys, set includeMeta to false. This is the default option.
  • To list metric keys and descriptors, set includeMeta to true. A metric descriptor contains parameters of a metric.

The request produces an application/json payload.

This request is an early adopter release and may be changed in non compatible way.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/v2/metrics/descriptors
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/descriptors

Parameters

Parameter Type Description In Required
includeMeta boolean

List only metric keys (false) or include metric descriptors (true).

If not set, false is used.

query optional

Response format

The MetricDescriptorMap object

A list of metrics and their descriptors.

Element Type Description
metrics object

A list of metrics and their descriptors.

The MetricDescriptor object

The descriptor of a metric.

Element Type Description
meta MetricMeta

Parameters of the metric.

The MetricMeta object

The descriptor of a metric.

Element Type Description
dimensionDefinitions MetricDimensionDefinition[]

The fine metric division, for example, process group and process ID for some process-related metric.

defaultAggregation MetricStatistic

The default aggregation of the metric.

It is always used if you don't specify the desired aggregation.

aggregationTypes string[]

The list of allowed aggregations for this metric.

metricKey string

The fully qualified key of the metric.

displayName string

The name of the metric in the user interface.

description string

A short description of the metric.

unit string

The unit of the metric.

The MetricStatistic object

The default aggregation of a metric.

Element Type Description
parameter number

Specified which percentile of the metric should be delivered.

Applicable only to the PERCENTILE aggregation type.

Valid values for percentile are between 0 and 100.

type string

The type of default aggregation.

The MetricDimensionDefinition object

The dimension of a metric.

Element Type Description
index integer

The unique 0-based index of the dimension.

Appending transformations such as :names or :parents may change the indexes of dimensions.

name string

The name of the dimension.

It must be unique within the metric.

type string

The type of the dimension.

Example

In this example, the request queries all metrics available in the mySampleEnv environment. Only metric keys will be listed; descriptors are excluded (includeMeta is set to false).

Curl

curl -X GET \
  'https://mySampleEnv.live.dynatrace.com/api/v2/metrics/descriptors?includeMeta=false' \
  -H 'Authorization: Api-Token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v2/metrics/descriptors?includeMeta=false

Response body

{
  "metrics": {    
    "builtin:host.cpu.load": {},
    "builtin:host.cpu.idle": {},
    "builtin:service.errors.server.count": {},
    "builtin:service.keyRequest.count.client": {},
  }
}

Response code

200