RUM JavaScript API - GET OneAgent JavaScript tag with SRI

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.

GETSaaShttps://{your-environment-id}.live.dynatrace.com/api/v1/rum/jsTagSri/{entity}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v1/rum/jsTagSri/{entity}

Authentication

To execute this request, you need an access token with RumJavaScriptTagManagement scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
entitystring

The Dynatrace entity ID of the application.

You can obtain it from the response of the GET the list of manually injected applications call.

pathrequired

Response

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

Example

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

curl -X GET \
https://mySampleEnv.live.dynatrace.com/api/v1/rum/jsTagSri/APPLICATION-BBFA55551D507E2B \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v1/rum/jsTagSri/APPLICATION-BBFA55551D507E2B

Response body

<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>

Response code

200