POST /v2/tags

To create a tag you can send a POST request to /v2/tags with a name attribute.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
name String No

The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag.

Note: Tag names are case stable, which means the capitalization you use when you first create a tag is canonical.

When working with tags in the API, you must use the tag's canonical capitalization. For example, if you create a tag named "PROD", the URL to add that tag to a resource would be https://api.digitalocean.com/v2/tags/PROD/resources (not /v2/tags/prod/resources).

Tagged resources in the control panel will always display the canonical capitalization. For example, if you create a tag named "PROD", you can tag resources in the control panel by entering "prod". The tag will still display with its canonical capitalization, "PROD".

resources Object No

An embedded object containing key value pairs of resource type and resource statistics. It also includes a count of the total number of resources tagged with the current tag as well as a last_tagged_uri attribute set to the last resource tagged with the current tag.

resources.count Integer No

The number of tagged objects for this type of resource.

resources.databases Object No

Tagged Resource Statistics include metadata regarding the resource type that has been tagged.

resources.databases.count Integer No

The number of tagged objects for this type of resource.

resources.databases.last_tagged_uri String No

The URI for the last tagged object for this type of resource.

resources.imgages Object No

Tagged Resource Statistics include metadata regarding the resource type that has been tagged.

resources.imgages.count Integer No

The number of tagged objects for this type of resource.

resources.imgages.last_tagged_uri String No

The URI for the last tagged object for this type of resource.

resources.last_tagged_uri String No

The URI for the last tagged object for this type of resource.

resources.droplets Object No

Tagged Resource Statistics include metadata regarding the resource type that has been tagged.

resources.droplets.count Integer No

The number of tagged objects for this type of resource.

resources.droplets.last_tagged_uri String No

The URI for the last tagged object for this type of resource.

resources.volume_snapshots Object No

Tagged Resource Statistics include metadata regarding the resource type that has been tagged.

resources.volume_snapshots.count Integer No

The number of tagged objects for this type of resource.

resources.volume_snapshots.last_tagged_uri String No

The URI for the last tagged object for this type of resource.

resources.volumes Object No

Tagged Resource Statistics include metadata regarding the resource type that has been tagged.

resources.volumes.count Integer No

The number of tagged objects for this type of resource.

resources.volumes.last_tagged_uri String No

The URI for the last tagged object for this type of resource.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.