Network Gateway Labels
Labels are key-value pairs that help you organize and categorize network gateway services. Use labels to filter services, apply policies, or track resources across your infrastructure.
GET/1.3/gateway/{uuid}/labels
List labels
Returns a list of all labels for a network gateway.
Request
GET
/1.3/gateway/{uuid}/labelscurl -X GET https://api.upcloud.com/1.3/gateway/04b87f79-1a17-4f64-ad8e-33bd4c3f5c1b/labels \
-u your_username:your_password
GET/1.3/gateway/{uuid}/labels/{key}
Get label details
Returns details of a specific label.
Request
GET
/1.3/gateway/{uuid}/labels/{key}curl -X GET https://api.upcloud.com/1.3/gateway/04b87f79-1a17-4f64-ad8e-33bd4c3f5c1b/labels/environment \
-u your_username:your_password
POST/1.3/gateway/{uuid}/labels
Create label
Creates a new label for a network gateway.
Attributes
- Name
key- Type
- string
- Description
Label key (1-255 chars, alphanumeric with - and _).
- Name
value- Type
- string
- Description
Label value (1-255 chars).
Request
POST
/1.3/gateway/{uuid}/labelscurl -X POST https://api.upcloud.com/1.3/gateway/04b87f79-1a17-4f64-ad8e-33bd4c3f5c1b/labels \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"key": "cost-center",
"value": "infrastructure"
}'
PATCH/1.3/gateway/{uuid}/labels/{key}
Modify label
Modifies an existing label's value.
Attributes
- Name
value- Type
- string
- Description
Updated label value.
Request
PATCH
/1.3/gateway/{uuid}/labels/{key}curl -X PATCH https://api.upcloud.com/1.3/gateway/04b87f79-1a17-4f64-ad8e-33bd4c3f5c1b/labels/environment \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"value": "staging"
}'
DELETE/1.3/gateway/{uuid}/labels/{key}
Delete label
Deletes a label from a network gateway.
Request
DELETE
/1.3/gateway/{uuid}/labels/{key}curl -X DELETE https://api.upcloud.com/1.3/gateway/04b87f79-1a17-4f64-ad8e-33bd4c3f5c1b/labels/cost-center \
-u your_username:your_password