POST /v2/tags/{tag_id}/resources
Resources can be tagged by sending a POST request to
/v2/tags/$TAG_NAME/resources with an array of json objects containing
resource_id and resource_type attributes.
Currently only tagging of Droplets, Databases, Images, Volumes, and Volume
Snapshots is supported. resource_type is expected to be the string droplet,
database, image, volume or volume_snapshot. resource_id is expected
to be the ID of the resource as a string.
In order to tag a resource, you must have both tag:create and <resource type>:update scopes. For example,
to tag a Droplet, you must have tag:create and droplet:update.
Servers
- https://api.digitalocean.com
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
tag_id |
String | Yes |
The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. |
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 |
|---|---|---|---|
resources[] |
Array | Yes |
An array of objects containing resource_id and resource_type attributes. This response will only include resources that you are authorized to see.
For example, to see Droplets, include the |
resources[].resource_type |
String | No |
The type of the resource. Valid values:
|
resources[].resource_id |
String | No |
The identifier of a resource. |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.