Synthetic metrics API - GET a metric

  • Reference

Gets the descriptor of the specified calculated synthetic metric.

The request produces an application/json payload.

GETSaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/calculatedMetrics/synthetic/{metricKey}
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/calculatedMetrics/synthetic/{metricKey}

Authentication

To execute this request, you need an access token with ReadConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
metricKeystring

The key of the required calculated synthetic metric.

pathrequired

Response

Response codes

CodeTypeDescription
200CalculatedSyntheticMetric

Success

Response body objects

The CalculatedSyntheticMetric object

Definition of the calculated synthetic metric.

ElementTypeDescription
dimensionsSyntheticMetricDimension[]

A list of metric dimensions.

enabledboolean

The metric is enabled (true) or disabled (false).

filterSyntheticMetricFilter

Filter of the calculated synthetic metric.

metricstring

The type of the synthetic metric.

  • ApplicationCache
  • Callback
  • CumulativeLayoutShift
  • DNSLookup
  • DOMComplete
  • DOMContentLoaded
  • DOMInteractive
  • FailedRequestsResources
  • FirstContentfulPaint
  • FirstInputDelay
  • FirstInputStart
  • FirstPaint
  • HTMLDownloaded
  • HttpErrors
  • JavaScriptErrors
  • LargestContentfulPaint
  • LoadEventEnd
  • LoadEventStart
  • LongTasks
  • NavigationStart
  • OnDOMContentLoaded
  • OnLoad
  • Processing
  • RedirectTime
  • Request
  • RequestStart
  • ResourceCount
  • Response
  • SecureConnect
  • SpeedIndex
  • TCPConnect
  • TimeToFirstByte
  • TotalDuration
  • TransferSize
  • UserActionDuration
  • VisuallyComplete
metricKeystring

The unique key of the metric.

The key must have the calc:synthetic prefix.

monitorIdentifierstring

The Dynatrace entity ID of the synthetic monitor to which the metric belongs.

namestring

The name of the metric, displayed in the UI.

The SyntheticMetricDimension object

Dimension of the calculated synthetic metric.

ElementTypeDescription
dimensionstring

The dimension of the metric.

  • Event
  • Location
  • ResourceOrigin
topXinteger

The number of top values to be calculated.

The SyntheticMetricFilter object

Filter of the calculated synthetic metric.

ElementTypeDescription
actionTypestring

Only user actions of the specified type are included in the metric calculation.

  • Custom
  • Load
  • Xhr
errorCodeinteger

Only executions finished with the specified error code are included in the metric calculation.

eventstring

Only the specified browser clickpath event is included in the metric calculation.

Specify the Dynatrace entity ID of the event here. You can fetch the list of clickpath events of the monitor with the GET a synthetic monitor request from the Environment API

hasErrorboolean

The execution status of the monitors to be included in the metric calculation:

  • true: Only failed executions are included.

  • false: All executions are included.

locationstring

Only executions from the specified location are included in the metric calculation.

Specify the Dynatrace entity ID of the location here. You can fetch the list of locations the monitor is running from with the GET a synthetic monitor request from the Environment API.

Response body JSON model

{
"dimensions": [
{
"dimension": "Location"
}
],
"enabled": true,
"filter": {
"event": "SYNTHETIC_TEST_STEP-1234",
"hasError": true
},
"metric": "UserActionDuration",
"metricKey": "calc:synthetic.browser.mymetric",
"monitorIdentifier": "SYNTHETIC_TEST-1234",
"name": "MyMetric"
}