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 |
|
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 | MobileSessionUserActionProperty |
The JSON body of the request. Contains the configuration of the property. |
body | optional |
Body format
The MobileSessionUserActionProperty object
Configuration of the mobile session or user action property.
Element | Type | Description | Required |
---|---|---|---|
key | string |
The unique key of the mobile session or user action property. |
required |
displayName | string |
The display name of the property. |
optional |
type | string |
The data type of the property. |
required |
origin | string |
The origin of the property |
required |
aggregation | string |
The aggregation type of the property. It defines how multiple values of the property are aggregated. |
optional |
storeAsUserActionProperty | boolean |
If |
optional |
storeAsSessionProperty | boolean |
If |
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 |
optional |
name | string |
The name of the reported value. Only applicable when the origin is set to |
optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"key": "string",
"displayName": "string",
"type": "DOUBLE",
"origin": "API",
"aggregation": "LAST",
"storeAsUserActionProperty": true,
"storeAsSessionProperty": true,
"cleanupRule": "string",
"serverSideRequestAttribute": "string",
"name": "string"
}
Response
Response codes
Code | Description |
---|---|
201 | Success. The property has been created. The response contains the ID of the new property. |
400 | Failed. The input is invalid. |
Response body
The MobileSessionUserActionPropertyShort object
A short representation of mobile session or user action property.
Element | Type | Description |
---|---|---|
key | string | The key of the session or user action property. |
displayName | string | The display name of the session or user action property. |
{
"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.
POST |
|
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.