Download the OneAgent JavaScript tag for a web frontend with the Dynatrace RUM API, including its configuration and a reference to the monitoring code.
| GET | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/rum/v1/manualInsertionTags/oneAgentJavaScriptTag/{id} |
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.
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.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| id | string | Smartscape FRONTEND id. | path | Required |
| scriptExecutionAttribute | string | Specifies the script execution attribute: async, defer, or none. If specified, this overrides the configured value. The element can hold these values
| query | Optional |
| Code | Type | Description |
|---|---|---|
| 200 | string | Success. The response contains the OneAgent JavaScript tag. |
| 400 | Error | Bad request. |
| 404 | Error | Frontend not found. |
| 4XX | Error | Client error. |
| 5XX | Error | Server error. |
ResponseBody objectErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code |
| constraintViolations | Constraint | A list of constraint violations |
| message | string | The error message |
ConstraintViolation objectA list of constraint violations
| Element | Type | Description |
|---|---|---|
| location | string | - |
| message | string | - |
| parameterLocation | string | -The element can hold these values
|
| path | string | - |
{"error": {"code": 1,"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}],"message": "string"}}