Applications API - POST tags

Assigns custom tags to the specified application. You only need to provide a tag value. The CONTEXTLESS context will be assigned automatically.

The usage of this API is limited to value-only tags. To assign key:value tags, use the Custom tags API.

The request consumes an application/json payload.

POSTSaaShttps://{your-environment-id}.live.dynatrace.com/api/v1/entity/applications/{meIdentifier}
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/v1/entity/applications/{meIdentifier}

Authentication

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

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

Parameters

ParameterTypeDescriptionInRequired
meIdentifierstring

The Dynatrace entity ID of the application you want to update.

pathrequired
bodyUpdateEntity

A list of tags to be assigned to a Dynatrace entity.

bodyoptional

Request body objects

The UpdateEntity object

A list of tags to be assigned to a Dynatrace entity.

ElementTypeDescriptionRequired
tagsstring[]

A list of tags to be assigned to a Dynatrace entity.

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.

{
"tags": [
"office-linz",
"office-klagenfurt"
]
}

Response

Response codes

CodeTypeDescription
204-

Success. The parameters of the application have been updated.

400ErrorEnvelope

Failed. The input is invalid.

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Example

In this example, the request assigns the tags iOS app and Android app to the easyTravel Demo application, which has the ID MOBILE_APPLICATION-752C288D59734C79.

The API token is passed in the Authorization header.

Curl

curl -X POST \
https://mySampleEnv.live.dynatrace.com/api/v1/entity/applications/MOBILE_APPLICATION-752C288D59734C79 \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \
-H 'Content-Type: application/json' \
-d '{
"tags": [
"iOS app",
"Android app"
]
}'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v1/entity/applications/MOBILE_APPLICATION-752C288D59734C79

Request body

{
"tags": [
"iOS app",
"Android app"
]
}

Response code

204