Try it free

Download the OneAgent JavaScript tag

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

Download the OneAgent JavaScript tag for a web frontend with the Dynatrace RUM API, including its configuration and a reference to the monitoring code.

GETSaaShttps://{your-environment-id}.apps.dynatrace.com/platform/rum/v1/manualInsertionTags/oneAgentJavaScriptTag/{id}

Overview

You use the id path parameter, the Smartscape FRONTEND ID, to download the OneAgent JavaScript tag for a web frontend. The tag includes the configuration and a reference to an external file with the monitoring code, so you need to update it after configuration changes. The optional scriptExecutionAttribute query parameter sets async, defer, or no attribute. A 200 response returns the tag, which you add to your pages to enable Real User Monitoring.

Authentication

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

Parameters

ParameterTypeDescriptionInRequired
idstring

Smartscape FRONTEND id.

pathRequired
scriptExecutionAttributestring

Specifies the script execution attribute: async, defer, or none. If specified, this overrides the configured value.

The element can hold these values
  • ASYNC
  • DEFER
  • NONE
queryOptional

Response

Response codes

CodeTypeDescription
200string

Success. The response contains the OneAgent JavaScript tag.

400ErrorEnvelope

Bad request.

404ErrorEnvelope

Frontend not found.

4XXErrorEnvelope

Client error.

5XXErrorEnvelope

Server error.

Response body objects

The ResponseBody object

The ErrorEnvelope object

ElementTypeDescription
errorError-

The Error object

ElementTypeDescription
codeinteger

The HTTP status code

constraintViolationsConstraintViolation[]

A list of constraint violations

messagestring

The error message

The ConstraintViolation object

A list of constraint violations

ElementTypeDescription
locationstring-
messagestring-
parameterLocationstring-
The element can hold these values
  • HEADER
  • PATH
  • PAYLOAD_BODY
  • QUERY
pathstring-

Response body JSON models

{
"error": {
"code": 1,
"constraintViolations": [
{
"location": "string",
"message": "string",
"parameterLocation": "HEADER",
"path": "string"
}
],
"message": "string"
}
}
Related tags
Platform APIDynatrace Platform