Get the iOS instrumentation snippets for a mobile frontend with the Dynatrace RUM API, with options for Session Replay, user opt-in, and Grail startup.
| GET | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/rum/v1/mobileConfigSnippets/ios/{id} |
You use the id path parameter, the Smartscape FRONTEND ID of a mobile frontend, to get the iOS instrumentation snippets for that app. Optional query parameters such as sessionReplay, userOptIn, and startupWithGrail override the configured settings for the generated snippets. A 200 response returns the snippets to add to your app.
To execute this request, you need a platform token or OAuth access token with rum:mobile-config-snippets:read scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| id | string | Smartscape FRONTEND id. | path | Required |
| sessionReplay | boolean | Enables or disables Session Replay. If specified, this overrides the configured value. | query | Optional |
| userOptIn | boolean | Enables or disables user opt-in mode. If specified, this overrides the configured value. | query | Optional |
| startupWithGrail | boolean | Enables or disables startup with Grail. If specified, this overrides the configured value. | query | Optional |
| Code | Type | Description |
|---|---|---|
| 200 | Ios | Success. The response contains the iOS mobile snippets. |
| 400 | Error | Bad request. |
| 404 | Error | Frontend not found. |
| 4XX | Error | Client error. |
| 5XX | Error | Server error. |
IosMobileConfigSnippetsDto objectMobile instrumentation snippets for the iOS platform.
| Element | Type | Description |
|---|---|---|
| infoPlist | string | The Info.plist entries carrying the Dynatrace configuration. |
| optInObjectiveC | string | The user opt-in privacy configuration code (Objective-C). |
| optInSwift | string | The user opt-in privacy configuration code (Swift). |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code |
| constraintViolations | Constraint | A list of constraint violations |
| message | string | The error message |
ConstraintViolation objectA list of constraint violations
| Element | Type | Description |
|---|---|---|
| location | string | - |
| message | string | - |
| parameterLocation | string | -The element can hold these values
|
| path | string | - |
{"infoPlist": "string","optInObjectiveC": "string","optInSwift": "string"}
{"error": {"code": 1,"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}],"message": "string"}}