Returns the most recent OneAgent JavaScript tag with SRI. This is an HTML snippet to be manually inserted into your web application code containing configuration, a reference to the monitoring code, and an integrity hash. For more information on this tag format, see Use Subresource Integrity (SRI) for Real User Monitoring code.
The request produces a text/plain
payload.
GET | SaaS | https://{your-environment-id}.live.dynatrace.com/api/v1/rum/jsTagSri/{entity} |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/v1/rum/jsTagSri/{entity} |
To execute this request, you need an access token with RumJavaScriptTagManagement
scope.
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. You can obtain it from the response of the GET the list of manually injected applications call. | path | required |
The response is a plain text containing the most recent version of the OneAgent JavaScript tag with SRI for the specified application.
In this example, the request fetches the latest version of the OneAgent JavaScript tag with SRI for an application with the ID APPLICATION-BBFA55551D507E2B.
The API token is passed in the Authorization header.
curl -X GET \https://mySampleEnv.live.dynatrace.com/api/v1/rum/jsTagSri/APPLICATION-BBFA55551D507E2B \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
https://mySampleEnv.live.dynatrace.com/api/v1/rum/jsTagSri/APPLICATION-BBFA55551D507E2B
<script type="text/javascript" src="https://mySampleEnv.live.dynatrace.com/jstag/1468ae7109d/sri/ruxitagent_ICANVfqru_10311250304175033.js" data-dtconfig="app=bbfa55551d507e2b|cors=1|featureHash=ICANVfqru|reportUrl=https://mySampleEnv.live.dynatrace.com/bf|cuc=swozoyh2|lastModification=1741251723608" crossorigin="anonymous" integrity="sha256-EERfb5FT82h91/bMeayw89TFwPGbAkbjOhvqVwjPgRw="></script>
200