Metrics API - GET all metrics

Lists all available metrics.

You can limit the output by using the pagination:

  1. Specify the number of results per page in the pageSize query parameter.
  2. Then use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.

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}/metrics
  • SaaS https://{your-environment-id}.live.dynatrace.com/metrics

Parameters

Parameter Type Description In Required
nextPageKey string

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters. nextPageKey is set to null on the last page.

query optional
pageSize integer

The desired amount of primary entities for which data is delivered in a single response payload.

The maximal allowed page size is 1000.

If not set, 100 is used.

query optional
metricSelector string

Selects metrics for the query by their keys.

You can specify multiple metric keys separated by commas. For example: metrickey1,metrickey2.

To select multiple metrics belonging to the same parent, you can use this shorthand: list the last part of the required metric keys in parentheses, separated by commas, while keeping the common part untouched. For example, to list the builtin:host.cpu.idle and builtin:host.cpu.user metric, you could write: builtin:host.cpu.(idle,user).

You can set additional transformation operators, separated by a colon (:). See the Metrics API - selector transformations help page for additional information on available result transformations.

The length of the selector string is limited to 1,000 characters.

query optional
fields string

Turns on optional metadata properties:

  • aggregationTypes (list of available aggregation techniques, e.g. "MIN", "PERCENTILE"),
  • defaultAggregation (aggregation to use when no explicit aggregation specified, also used for :auto),
  • dimensionDefinitions (names, indexes and types of dimensions). Multiple properties can be joined together with commas, e.g. fields=aggregationTypes,defaultAggregation,dimensionDefinitions turns on all available metadata.
query optional

Response format

The MetricSchemaCollectionDto object

A list of metric descriptors.

Element Type Description
totalCount integer

Combined descriptor count of all pages.

nextPageKey string

Key to the next page for use with nextPageKey, or null for the last page.

metrics MetricSchemaDto[]

List of metric descriptors.

The MetricSchemaDto object

The descriptor of a metric.

Element Type Description
aggregationTypes string[]

The list of allowed aggregations for this metric. Must be enabled with the "fields" parameter on /metrics and is always present on /metrics/{metricId}.

metricId string

The fully qualified key of the metric, followed by a transform operator chain.

defaultAggregation MetricStatistic
dimensionDefinitions MetricDimensionDefinition[]

The fine metric division, for example, process group and process ID for some process-related metric.Must be enabled with the "fields" parameter on /metrics and is always present on /metrics/{metricId}.

description string

A short description of the metric.

unit string

The unit of the metric.

displayName string

The name of the metric in the user interface.

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.

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.