For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/api/latest/tags.md. A documentation index is available at /llms.txt.

The tag endpoint allows you to assign tags to hosts, for example: role:database. Those tags are applied to all metrics sent by the host. Refer to hosts by name (yourhost.example.com) when fetching and applying tags to a particular host.

The component of your infrastructure responsible for a tag is identified by a source. For example, some valid sources include nagios, hudson, jenkins, users, feed, chef, puppet, git, bitbucket, fabric, capistrano, etc. Find a complete list of source type names under API Source Attributes.

Read more about tags on Getting Started with Tags.

Get All Host Tags

GET https://api.ap1.datadoghq.com/api/v1/tags/hostshttps://api.ap2.datadoghq.com/api/v1/tags/hostshttps://api.datadoghq.eu/api/v1/tags/hostshttps://api.ddog-gov.com/api/v1/tags/hostshttps://api.us2.ddog-gov.com/api/v1/tags/hostshttps://api.uk1.datadoghq.com/api/v1/tags/hostshttps://api.datadoghq.com/api/v1/tags/hostshttps://api.us3.datadoghq.com/api/v1/tags/hostshttps://api.us5.datadoghq.com/api/v1/tags/hosts

Get Host Tags

GET https://api.ap1.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.ap2.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.datadoghq.eu/api/v1/tags/hosts/{host_name}https://api.ddog-gov.com/api/v1/tags/hosts/{host_name}https://api.us2.ddog-gov.com/api/v1/tags/hosts/{host_name}https://api.uk1.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.us3.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.us5.datadoghq.com/api/v1/tags/hosts/{host_name}

Add tags to a host

POST https://api.ap1.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.ap2.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.datadoghq.eu/api/v1/tags/hosts/{host_name}https://api.ddog-gov.com/api/v1/tags/hosts/{host_name}https://api.us2.ddog-gov.com/api/v1/tags/hosts/{host_name}https://api.uk1.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.us3.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.us5.datadoghq.com/api/v1/tags/hosts/{host_name}

Update host tags

PUT https://api.ap1.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.ap2.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.datadoghq.eu/api/v1/tags/hosts/{host_name}https://api.ddog-gov.com/api/v1/tags/hosts/{host_name}https://api.us2.ddog-gov.com/api/v1/tags/hosts/{host_name}https://api.uk1.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.us3.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.us5.datadoghq.com/api/v1/tags/hosts/{host_name}

Remove host tags

DELETE https://api.ap1.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.ap2.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.datadoghq.eu/api/v1/tags/hosts/{host_name}https://api.ddog-gov.com/api/v1/tags/hosts/{host_name}https://api.us2.ddog-gov.com/api/v1/tags/hosts/{host_name}https://api.uk1.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.us3.datadoghq.com/api/v1/tags/hosts/{host_name}https://api.us5.datadoghq.com/api/v1/tags/hosts/{host_name}