• Home
  • Dynatrace API
  • Environment
  • Topology and Smartscape v1
  • Hosts
  • Hosts API - DELETE tag

Hosts API - DELETE tag

We have a new version of this API—Entity API v2. Check it out!

Deletes the specified custom tag from the specified host. Deletion cannot be undone.

DELETEManaged https://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/{meIdentifier}/tags/{tag}
SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/entity/infrastructure/hosts/{meIdentifier}/tags/{tag}
Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/{meIdentifier}/tags/{tag}

Authentication

To execute this request, you need an access token with Access problem and event feed, metrics, and topology (DataExport) scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
meIdentifierstring

The Dynatrace entity ID of the host.

pathrequired
tagstring

The tag to be removed.

pathrequired

Response

Response codes

CodeTypeDescription
204

Success. The tag of the host has been removed.

400ErrorEnvelope

Failed. The input is invalid.

404

Failure. The tag could not be found.

Example

In this example, the request deletes the Rack123 tag from the tag009 host, which has the ID of HOST-B7A6F9EE9F366CB5.

The API token is passed in the Authorization header.

Curl

shell
curl -X POST \ https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/hosts/HOST-B7A6F9EE9F366CB5/tags/Rack123 \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/hosts/HOST-B7A6F9EE9F366CB5/tags/Rack123

Response code

204

Related topics
  • Hosts

    Learn how to get started with host monitoring, understand which measures contribute to host health, how to set up custom host names, and more.