DigitalOcean-public.v2-new_Tags
Create a New Tag
To create a tag you can send a POST request to /v2/tags with a name attribute.
post/v2/tags
Request body
Example request
{
"name": "extra-awesome",
"resources": {
"count": 5,
"last_tagged_uri": "https://api.digitalocean.com/v2/images/7555620",
"droplets": {
"count": 1,
"last_tagged_uri": "https://api.digitalocean.com/v2/droplets/3164444"
},
"images": {
"count": 1,
"last_tagged_uri": "https://api.digitalocean.com/v2/images/7555620"
},
"volumes": {
"count": 1,
"last_tagged_uri": "https://api.digitalocean.com/v2/volumes/3d80cb72-342b-4aaa-b92e-4e4abb24a933"
},
"volume_snapshots": {
"count": 1,
"last_tagged_uri": "https://api.digitalocean.com/v2/snapshots/1f6f46e8-6b60-11e9-be4e-0a58ac144519"
},
"databases": {
"count": 1,
"last_tagged_uri": "https://api.digitalocean.com/v2/databases/b92438f6-ba03-416c-b642-e9236db91976"
}
}
}Response
The response will be a JSON object with a key called tag. The value of this will be a tag object containing the standard tag attributes
Example response
{
"tag": {
"name": "extra-awesome",
"resources": {
"count": 0,
"droplets": {
"count": 0
},
"images": {
"count": 0
},
"volumes": {
"count": 0
},
"volume_snapshots": {
"count": 0
},
"databases": {
"count": 0
}
}
}
}