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 floating IP, a mail service or an Object Storage service: its page's Overview tab, in the Tags card.
    • A service with no product page of its own, such as a Snapshot Storage plan or a DDoS Shield profile: in the sidebar, select Billing, then the Subscriptions tab, and select the service. The Tags card is beside its billing.
    • A Cloud Compute instance, or a game server or a database on App Deployment: its Settings tab, in the Tags card. This tags the instance or the server, which is not the same as tagging its service.
  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 Cloud Compute. For every service on your account, select Billing in the sidebar, then the Subscriptions tab. The App Deployment list has no tag filter.
  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. On Subscriptions, select each tag again, or select Clear filters to turn off every filter.

A Cloud Compute instance and a server on App Deployment 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
The Overview tab of a floating IP, a mail service or an Object Storage service Subscriptions
A service's page under Subscriptions Subscriptions
An instance's Settings tab Cloud Compute
A server's Settings tab, on App Deployment Only on that tab

The services of instances, servers and external servers have no Tags card in the dashboard. To find one of them by tag on Subscriptions, tag its service through the API, with source_type set to service (With the API).

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 Subscriptions
Instance tags filter Cloud Compute, and server tags show only on the server's Settings tab. Subscriptions filters by the tags on services. Tag the service through the API as well, as Where tags live explains.

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