Try it free

Get metric adapter deployment YAML

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026
  • Early Access

Get the metric adapter deployment YAML in Dynatrace with the Synthetic API for Kubernetes or OpenShift, using platform and namespace inputs.

GETSaaShttps://{your-environment-id}.apps.dynatrace.com/platform/synthetic/v1/locations/metric-adapter/yaml

Overview

You use the metric-adapter YAML endpoint to get the deployment file content for a Kubernetes or OpenShift cluster. The query parameters platform and namespace determine the generated YAML, and the response returns the file content.

Authentication

To execute this request, you need a platform token or OAuth access token with synthetic:locations:read scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
platformstring

The container platform. Currently supported values are KUBERNETES and OPENSHIFT. The default value is KUBERNETES.

queryOptional
namespacestring

The target namespace.

queryOptional

Response

Response codes

CodeTypeDescription
200-

Success. The response contains the content of the YAML deployment file.

4XXErrorResponseEnvelope

Client side error.

5XXErrorResponseEnvelope

Server side error.

Response body objects

The ErrorResponseEnvelope object

Encloses the encountered error.

ElementTypeDescription
errorErrorResponse

Basic information of the encountered error.

The ErrorResponse object

Basic information of the encountered error.

ElementTypeDescription
codeinteger

The returned HTTP status code.

detailsErrorResponseDetails

Detailed information of the error.

messagestring

Description of the encountered error.

The ErrorResponseDetails object

Detailed information of the error.

ElementTypeDescription
typestring

Defines the actual set of fields depending on the value. See one of the following objects:

  • constraintViolation -> ConstraintViolationDetails
The element can hold these values
  • constraintViolation

Response body JSON models

{
"error": {
"code": 1,
"details": {
"type": "constraintViolation"
},
"message": "string"
}
}
Related tags
Platform APIDynatrace PlatformDigital Experience