Mobile and custom app API - POST user session property

Creates a new user session property in the specified application.

The request consumes and produces an application/json payload.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Parameters

Parameter Type Description In Required
applicationId string

The ID of the required application.

path required
body MobileSessionProperty

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

body optional

Body format

The MobileSessionProperty object

Configuration of the mobile session property.

Element Type Description Required
key string

The unique key of the session property.

required
displayName string

The display name of the property.

optional
type string

The data type of the property.

The type element can hold these values.
required
origin string

The origin of the property

The origin element can hold these values.
required
aggregation string

The aggregation type of the property.

It defines how multiple values of the property are aggregated.

The aggregation element can hold these values.
optional
storeAsUserActionProperty boolean

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

optional
storeAsSessionProperty boolean

If true, the property is stored as a session property

optional
cleanupRule string

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

The ID of the request attribute.

Only applicable when the origin is set to SERVER_SIDE_REQUEST_ATTRIBUTE.

optional
name string

The name of the reported value.

Only applicable when the origin is set to API.

optional

Possible values

Possible values for the aggregation element in the MobileSessionProperty object:

  • FIRST
  • LAST
  • MAX
  • MIN
  • SUM

Possible values for the origin element in the MobileSessionProperty object:

  • API
  • SERVER_SIDE_REQUEST_ATTRIBUTE

Possible values for the type element in the MobileSessionProperty object:

  • DOUBLE
  • LONG
  • STRING

Response

Response codes

Code Description
201

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

400

Failed. The input is invalid.

Response body

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

Element Type Description
id string

The ID of the Dynatrace entity.

name string

The name of the Dynatrace entity.

description string

A short description of the Dynatrace entity.

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.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/mobile/{applicationId}/userActionAndSessionProperties/validator

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

Code Description
204

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

400

Failed. The input is invalid.

Response body

A successful request doesn't return any content.