Skip to content
Coritan Docs

Tag your services

Add labels to your services so you can filter and find them, in the dashboard or through the API.

View as Markdown

A tag is a label of your own, such as production or eu-customers, that you put on a service, an instance or a server to find it again. Tags do nothing else: they change no setting and cost nothing.

  • A tag uses lowercase letters, digits and hyphens, and starts with a letter or a digit. The dashboard turns spaces into hyphens and capitals into lowercase for you.
  • Tags on a service and tags on the instance or server behind it are kept apart. Where tags live explains which list each one filters.
  1. Open the thing you want to tag:
    • A service: its page from Services, or the page of a floating IP, a mail service or an Object Storage service. The Tags card is on the Overview tab.
    • A Cloud Compute instance or a Container Apps server: its Settings tab, in the Tags card.
  2. Type the tag in Add a tag. Under the field, Suggestions offers the tags you already use.
  3. Press Enter, type a comma, or select Add tag.

The tag is saved at once and appears as a chip above the field.

  1. Open the Tags card that holds the tag.
  2. Select the cross on the tag's chip. With the field empty, Backspace removes the last tag.
  1. Open Services, Cloud Compute or Container Apps.
  2. Select a tag in the row of tags under the search box. The number beside each tag counts the items that have it.
  3. Select more tags to narrow the list to items that have all of them.
  4. Select Clear to show everything again.

A Cloud Compute instance and a Container Apps server each have a service as well: the service carries the plan and the billing. Each keeps its own tags.

Where you add the tag Where it shows and filters
A service's Overview tab Services
An instance's Settings tab Cloud Compute
A server's Settings tab Container Apps

To find an instance or a server from Services, tag its service as well.

The tag shows on the item and in its list, where it filters. Through the API, GET /services/?tag= returns only the services with that tag.

Could not save the tags with Tag must be 1–128 chars: lowercase letters, digits, hyphen, underscore
The tag has a character that tags cannot hold, such as a dot, a colon or a slash. Use lowercase letters, digits and hyphens.
A tag you added on an instance or server is missing from Services
Instance and server tags filter Cloud Compute and Container Apps. Add the tag on the service's Overview tab too, as Where tags live shows.

Each tag belongs to a source: a type and an ID.

source_type source_id
service The service ID, such as 1042.
vps (or cloud_compute) The instance's UUID.
container_server (or server) The server's UUID.
dns_zone The DNS zone's ID.
proxy_route The web proxy's ID.

Read a source's tags with GET /client/tags/sources/{source_type}/{source_id}:

Shell
curl https://api.coritan.com/api/v1/client/tags/sources/service/1042 \
  -H "Authorization: Bearer $CORITAN_TOKEN"
JSON
{"source_type": "service", "source_id": "1042", "tags": ["production", "web"]}

Add one tag with POST and {"tag": "production"}. Replace every tag at once with PUT and a list of up to 50; an empty list removes them all:

Shell
curl -X PUT https://api.coritan.com/api/v1/client/tags/sources/vps/0b6f3e2a-7c41-4d8e-9f25-6a1d3c8e4b70 \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tags": ["production", "eu-customers"]}'

Remove one with DELETE /client/tags/sources/{source_type}/{source_id}/{tag}. All three answer with the source's tags after the change, sorted: {"tags": ["eu-customers", "production"]}.

The API lowercases a tag and turns spaces into hyphens. It accepts lowercase letters, digits, hyphens and underscores, 1–128 characters, starting with a letter or a digit. Adding a tag the source already has changes nothing.

GET /client/tags/vocabulary lists the tags you use on one source_type, with how many of your resources carry each:

Shell
curl "https://api.coritan.com/api/v1/client/tags/vocabulary?source_type=service" \
  -H "Authorization: Bearer $CORITAN_TOKEN"
JSON
{"items": [{"tag": "production", "resource_count": 3}, {"tag": "web", "resource_count": 1}], "source_type": "service"}

The errors:

  • 400 Unsupported source_type: ... or Tagging not enabled for source_type: ...: use a type from the table.
  • 404 Service not found, Cloud Compute instance not found, Server not found, DNS zone not found or Proxy route not found: the ID is wrong or the item is not yours.
  • 400 Tag must be 1–128 chars: lowercase letters, digits, hyphen, underscore: the tag breaks the format.
  • 422: a PUT sent more than 50 tags.

API operations on this page

MethodPathWhat it does
GET/api/v1/client/tags/sources/{source_type}/{source_id}Get resource tags
POST/api/v1/client/tags/sources/{source_type}/{source_id}Add resource tag
PUT/api/v1/client/tags/sources/{source_type}/{source_id}Replace resource tags
DELETE/api/v1/client/tags/sources/{source_type}/{source_id}/{tag}Remove resource tag
GET/api/v1/client/tags/vocabularyDistinct tags on resources you own for a given sourcetype