RUM JavaScript code API - GET JavaScript tag
Returns the most recent JavaScript tag that downloads the monitoring code into your application. The tag references a JavaScript file with full configuration and monitoring code, which can reduce caching duration.
You can also use these functionally equivalent options to obtain RUM JavaScript code:
The request produces a plain/text
payload.
GET |
|
Authentication
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.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
entity | string |
The Dynatrace entity ID of the application. |
path | required |
Response
The response is a plain text, containing the HTML tag for the most recent version of the JavaScript tag for the specified application.
Example
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
curl -X GET \
https://mySampleEnv.live.dynatrace.com/api/v1/rum/jsTagComplete/APPLICATION-BBFA55551D507E2B \
-H 'Authorization: Api-Token abcdefjhij1234567890'
Request URL
https://mySampleEnv.live.dynatrace.com/api/v1/rum/jsTagComplete/APPLICATION-BBFA55551D507E2B
Response body
<script type="text/javascript" src="https://mySampleEnv.live.dynatrace.com/jstag/1468ae7109d/bf79563wis/37c3a000d8cbd913_complete.js" crossorigin="anonymous"></script>
Response code
200