Tags
Tags provide a way to group and categorize servers. Each tag has a unique name and optional description. Servers can have multiple tags, and tags can be assigned to multiple servers.
Tags are useful for organizing servers by environment (production, staging, development), role (web, database, cache), or any other classification that fits your workflow.
List tags
Returns all existing tags with their properties and the servers assigned to each tag.
Response fields
- Name
name- Type
- string
- Description
Tag name (1-32 characters, alphanumeric and underscore).
- Name
description- Type
- string
- Description
Tag description (max 255 characters).
- Name
servers- Type
- object
- Description
List of server UUIDs assigned to this tag.
Request
curl -X GET https://api.upcloud.com/1.3/tag \
-u your_username:your_password
Create tag
Creates a new tag. Existing servers can be tagged in the same request.
Attributes
- Name
name- Type
- string
- Description
Tag name (1-32 characters: A-Z, a-z, 0-9, underscore). Required.
- Name
description- Type
- string
- Description
Tag description (max 255 characters).
- Name
servers- Type
- object
- Description
List of server UUIDs to assign to the tag.
Request
curl -X POST https://api.upcloud.com/1.3/tag \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"tag": {
"name": "DEV",
"description": "Development servers",
"servers": {
"server": [
"0077fa3d-32db-4b09-9f5f-30d9e9afb565"
]
}
}
}'
Modify tag
Modifies an existing tag. You can rename the tag, change its description, or update the list of assigned servers.
Attributes
- Name
name- Type
- string
- Description
New tag name (to rename the tag).
- Name
description- Type
- string
- Description
Updated description.
- Name
servers- Type
- object
- Description
Updated list of server UUIDs.
Request
curl -X PUT https://api.upcloud.com/1.3/tag/DEV \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"tag": {
"name": "PROD",
"description": "Production servers",
"servers": {
"server": [
"0077fa3d-32db-4b09-9f5f-30d9e9afb565"
]
}
}
}'
Delete tag
Deletes an existing tag. This untags all servers from the specified tag and deletes the tag definition.
Request
curl -X DELETE https://api.upcloud.com/1.3/tag/DEV \
-u your_username:your_password
Assign tag to server
Assigns one or more tags to a server. The tags must already exist.
The tags parameter is a comma-separated list of tag names to assign.
Request
curl -X POST https://api.upcloud.com/1.3/server/00798b85-efdc-41ca-8021-f6ef457b8531/tag/DEV,web \
-u your_username:your_password
Remove tag from server
Removes one or more tags from a server. The tags must exist.
The tags parameter is a comma-separated list of tag names to remove.
Request
curl -X POST https://api.upcloud.com/1.3/server/00798b85-efdc-41ca-8021-f6ef457b8531/untag/DEV \
-u your_username:your_password