RUM JavaScript code API - GET OneAgent JavaScript tag

Returns the most recent OneAgent JavaScript tag. This is the complete configuration and monitoring code to be manually inserted into your web application code. The monitoring code is loaded as a separate file from a CDN.

You can also use these functionally equivalent options to obtain RUM JavaScript code:

The request produces a plain/text payload.

  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/rum/jsTag/{entity}
  • SaaS https://{your-environment-id}{entity}


To execute this request, you need the Real user monitoring JavaScript tag management (RumJavaScriptTagManagement) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.


Parameter Type Description In Required
entity string

The Dynatrace entity ID of the application.

path required


The response is a plain text, containing the HTML tag for the most recent version of OneAgent JavaScript tag for the specified application.


In this example, the request fetches the HTML tag for the latest version of the RUM JavaScript code for the easyTravel Ionic Web application, which has the ID of APPLICATION-BBFA55551D507E2B.

The API token is passed in the Authorization header.


curl -X GET \ \
  -H 'Authorization: Api-Token abcdefjhij1234567890'

Request URL

Response body

<script type="text/javascript" src=""

Response code