• Home
  • Dynatrace API
  • Configuration
  • RUM
  • Mobile and custom app
  • User action and session properties
  • PUT user session property

Mobile and custom app API - PUT user session property

Updates the specified user session property in an application.

If the session property with the specified ID does not exist, a new session property is created.

The request consumes and produces an application/json payload.

PUTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties/{key}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties/{key}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties/{key}

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
applicationIdstring

The ID of the required application.

pathrequired
keystring

The key of the required mobile session or user action property.

pathrequired
bodyMobileSessionUserActionPropertyUpd

The JSON body of the request. Contains the configuration of the property.

bodyoptional

Request body objects

The MobileSessionUserActionPropertyUpd object

An update of a mobile session or user action property.

ElementTypeDescriptionRequired
displayNamestring

The display name of the property.

optional
typestring

The data type of the property.

The element can hold these values
  • DOUBLE
  • LONG
  • STRING
required
originstring

The origin of the property

The element can hold these values
  • API
  • SERVER_SIDE_REQUEST_ATTRIBUTE
required
aggregationstring

The aggregation type of the property.

It defines how multiple values of the property are aggregated.

The element can hold these values
  • AVERAGE
  • FIRST
  • LAST
  • MAX
  • MIN
  • SUM
optional
storeAsUserActionPropertyboolean

If true, the property is stored as a user action property

optional
storeAsSessionPropertyboolean

If true, the property is stored as a session property

optional
cleanupRulestring

The cleanup rule of the property.

Defines how to extract the data you need from a string value. Specify the regular expression for the data you need there.

optional
serverSideRequestAttributestring

The ID of the request attribute.

Only applicable when the origin is set to SERVER_SIDE_REQUEST_ATTRIBUTE.

optional
namestring

The name of the reported value.

Only applicable when the origin is set to API.

optional

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.

json
{ "displayName": "string", "type": "DOUBLE", "origin": "API", "aggregation": "AVERAGE", "storeAsUserActionProperty": true, "storeAsSessionProperty": true, "cleanupRule": "string", "serverSideRequestAttribute": "string", "name": "string" }

Response

Response codes

CodeTypeDescription
201MobileSessionUserActionPropertyShort

Success. The property has been created. The response contains the ID of the new property.

204

Success. The property has been updated. The response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.

Response body objects

The MobileSessionUserActionPropertyShort object

A short representation of mobile session or user action property.

ElementTypeDescription
keystring

The key of the session or user action property.

displayNamestring

The display name of the session or user action property.

Response body JSON model

json
{ "key": "string", "displayName": "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/{applicationId}/userActionAndSessionProperties/{key}/validator
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties/{key}/validator
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties/{key}/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.