Database Labels
Labels provide a way to organize and filter your Managed Database services. Use labels to categorize databases by environment, team, project, or any other criteria.
You can filter database listings by label using query parameters like ?label=env=prod or ?label=team.
GET/1.3/database/{uuid}/labels
List labels
Returns all labels attached to a Managed Database service.
Request
GET
/1.3/database/{uuid}/labelscurl -X GET https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab/labels \
-u your_username:your_password
GET/1.3/database/{uuid}/labels/{key}
Get label details
Returns details of a specific label by key.
Request
GET
/1.3/database/{uuid}/labels/{key}curl -X GET https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab/labels/env \
-u your_username:your_password
POST/1.3/database/{uuid}/labels
Create label
Creates a new label for a Managed Database service.
Attributes
- Name
key- Type
- string
- Description
Label key (1-255 characters, alphanumeric, hyphens, underscores).
- Name
value- Type
- string
- Description
Label value (1-255 characters).
Request
POST
/1.3/database/{uuid}/labelscurl -X POST https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab/labels \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"key": "project",
"value": "ecommerce"
}'
PATCH/1.3/database/{uuid}/labels/{key}
Modify label
Updates the value of an existing label.
Attributes
- Name
value- Type
- string
- Description
New label value.
Request
PATCH
/1.3/database/{uuid}/labels/{key}curl -X PATCH https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab/labels/env \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"value": "staging"
}'
DELETE/1.3/database/{uuid}/labels/{key}
Delete label
Deletes a label from a Managed Database service.
Request
DELETE
/1.3/database/{uuid}/labels/{key}curl -X DELETE https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab/labels/project \
-u your_username:your_password