Client API: Resource Tags
User-defined labels on services, Cloud Compute instances, Container Apps, and other resources.
User-defined labels on services, Cloud Compute instances, Container Apps, and other resources. Filter lists with ?tag= or manage via /api/v1/client/tags.
Base URL: https://api.coritan.com/api/v1. Paths below are complete.
To try these requests in the browser, open the interactive Client API reference.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| 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/vocabulary |
Distinct tags on resources you own for a given sourcetype |
Get resource tags
Section titled Get resource tagsGET /api/v1/client/tags/sources/{source_type}/{source_id}
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
source_type |
path | string | yes |
source_id |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
source_type |
string |
source_id |
string |
tags |
array of string |
Add resource tag
Section titled Add resource tagPOST /api/v1/client/tags/sources/{source_type}/{source_id}
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
source_type |
path | string | yes |
source_id |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
tag |
string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
tags |
array of string |
Replace resource tags
Section titled Replace resource tagsPUT /api/v1/client/tags/sources/{source_type}/{source_id}
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
source_type |
path | string | yes |
source_id |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
tags |
array of string | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
tags |
array of string |
Remove resource tag
Section titled Remove resource tagDELETE /api/v1/client/tags/sources/{source_type}/{source_id}/{tag}
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
source_type |
path | string | yes |
source_id |
path | string | yes |
tag |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
tags |
array of string |
Distinct tags on resources you own for a given sourcetype
Section titled Distinct tags on resources you own for a given sourcetypeGET /api/v1/client/tags/vocabulary
Distinct tags on resources you own for a given source_type.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
source_type |
query | string | yes | e.g. vps, container_server, service |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
items |
array of TagVocabularyItem |
items[].tag |
string |
items[].resource_count |
integer |
source_type |
string or null |