Mobile and custom app API - PUT an app

  • Reference
  • Published Nov 05, 2020

Updates the specified mobile or custom app.

The request consumes and produces an application/json payload.

PUTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{id}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{id}

Authentication

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

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

Parameters

ParameterTypeDescriptionInRequired
idstring

The UUID of the required mobile or custom application. It can be found in the Instrumentation Wizard of your app.

pathRequired
bodyMobileCustomAppConfig

The JSON body of the request. Contains updated configuration of the mobile or custom application.

Do not set the identifier in the body.

bodyOptional

Request body objects

The MobileCustomAppConfig object

Configuration of an existing mobile or custom application.

ElementTypeDescriptionRequired
apdexSettingsMobileCustomApdex

Apdex configuration of a mobile or custom application.

A duration less than the tolerable threshold is considered satisfied.

Required
applicationIdstring

The UUID of the application.

It is used only by OneAgent to send data to Dynatrace.

Optional
applicationTypestring

The type of the application.

The element can hold these values
  • CUSTOM_APPLICATION
  • MOBILE_APPLICATION
Optional
beaconEndpointTypestring

The type of the beacon endpoint.

The element can hold these values
  • CLUSTER_ACTIVE_GATE
  • ENVIRONMENT_ACTIVE_GATE
  • INSTRUMENTED_WEB_SERVER
Required
beaconEndpointUrlstring

The URL of the beacon endpoint.

Only applicable when the beaconEndpointType is set to ENVIRONMENT_ACTIVE_GATE or INSTRUMENTED_WEB_SERVER.

Optional
costControlUserSessionPercentageinteger

The percentage of user sessions to be analyzed.

Required
iconTypestring

Custom application icon.

Mobile apps always use the mobile device icon, so this icon can only be set for custom apps.

The element can hold these values
  • AMAZON_ECHO
  • DESKTOP
  • EMBEDDED
  • IOT
  • MICROSOFT_HOLOLENS
  • UFO
  • USERS
Optional
identifierstring

The Dynatrace entity ID of the application.

Optional
namestring

The name of the application.

Required
optInModeEnabledboolean

The opt-in mode is enabled (true) or disabled (false).

This value is only applicable to mobile and not to custom apps.

Optional
sessionReplayEnabledboolean

The session replay is enabled (true) or disabled (false). This value is only applicable to mobile and not to custom apps.

Optional
sessionReplayOnCrashEnabledboolean

Deprecated. Please use sessionReplayEnabled to enable or disable session replay for mobile apps.

Optional

The MobileCustomApdex object

Apdex configuration of a mobile or custom application.

A duration less than the tolerable threshold is considered satisfied.

ElementTypeDescriptionRequired
frustratedOnErrorboolean

Apdex error condition: if true the user session is considered frustrated when an error is reported.

Required
frustratingThresholdinteger

Apdex frustrated threshold, in milliseconds: a duration greater than or equal to this value is considered frustrated.

Required
toleratedThresholdinteger

Apdex tolerable threshold, in milliseconds: a duration greater than or equal to this value is considered tolerable.

Required

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

{
"apdexSettings": {
"frustratedOnError": true,
"frustratingThreshold": 1,
"toleratedThreshold": 1
},
"applicationId": "string",
"applicationType": "CUSTOM_APPLICATION",
"beaconEndpointType": "CLUSTER_ACTIVE_GATE",
"beaconEndpointUrl": "string",
"costControlUserSessionPercentage": 1,
"iconType": "AMAZON_ECHO",
"identifier": "string",
"name": "string",
"optInModeEnabled": true,
"sessionReplayEnabled": true,
"sessionReplayOnCrashEnabled": true
}

Response

Response codes

CodeTypeDescription
204-

Success. The application has been updated. Response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.

404-

Failed. The specified entity doesn't exist.

Response body objects

The ErrorEnvelope object

ElementTypeDescription
errorError-

The Error object

ElementTypeDescription
codeinteger

The HTTP status code

constraintViolationsConstraintViolation[]

A list of constraint violations

messagestring

The error message

The ConstraintViolation object

A list of constraint violations

ElementTypeDescription
locationstring-
messagestring-
parameterLocationstring-
The element can hold these values
  • HEADER
  • PATH
  • PAYLOAD_BODY
  • QUERY
pathstring-

Response body JSON models

{
"error": {
"code": 1,
"constraintViolations": [
{
"location": "string",
"message": "string",
"parameterLocation": "HEADER",
"path": "string"
}
],
"message": "string"
}
}

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{id}/validator
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{id}/validator

Authentication

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

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

Response

Response codes

CodeTypeDescription
204-

Success. The submitted configuration is valid. Response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.

Response body objects

The ErrorEnvelope object

ElementTypeDescription
errorError-

The Error object

ElementTypeDescription
codeinteger

The HTTP status code

constraintViolationsConstraintViolation[]

A list of constraint violations

messagestring

The error message

The ConstraintViolation object

A list of constraint violations

ElementTypeDescription
locationstring-
messagestring-
parameterLocationstring-
The element can hold these values
  • HEADER
  • PATH
  • PAYLOAD_BODY
  • QUERY
pathstring-

Response body JSON models

{
"error": {
"code": 1,
"constraintViolations": [
{
"location": "string",
"message": "string",
"parameterLocation": "HEADER",
"path": "string"
}
],
"message": "string"
}
}