RUM JavaScript code API - GET OneAgent JavaScript tag
Returns the most recent OneAgent JavaScript tag.
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 permission assigned to your API token. To learn how to obtain and use it, see Authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
applicationid | string | The Dynatrace entity ID of the application. You can obtain it from the response of the GET the list of manually injected applications call. |
path | required |
Response
The response is a plain text, containing the HTML tag for the most recent version of OneAgent 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/jsTag/APPLICATION-BBFA55551D507E2B \
-H 'Authorization: Api-Token abcdefjhij1234567890'
Request URL
https://mySampleEnv.live.dynatrace.com/api/v1/rum/jsTag/APPLICATION-BBFA55551D507E2B
Response body
<script type="text/javascript" src="https://mySampleEnv.live.dynatrace.com/jstag/1468ae7109d/ruxitagent_ICA27SVfgqrx_10156181011154332.js"
data-dtconfig="app=bbfa55551d507e2b|cors=1|bp2=1|featureHash=ICA27SVfgqrx|reportUrl=https://mySampleEnv.live.dynatrace.com/bf|rdnt=1|bp=2|srms=1,1,,,|dpvc=1|srad=1|lastModification=0|dtVersion=10156181011154332|tp=500,50,0,1"
crossorigin="anonymous"></script>
Response code
200