# Organization API: Resource Tags

> Every Organization API operation tagged Resource Tags.

Source: https://docs.coritan.com/api/reference/organizations/resource-tags/

Base URL: `https://api.coritan.com/api/v1`. Paths below are complete.

To try these requests in the browser, open the [interactive Organization API reference](https://api.coritan.com/docs/org).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/tags/sources/{source_type}/{source_id}`](#op-get-api-v1-orgs-org-slug-tags-sources-source-type-source-id) | Get org resource tags |
| POST | [`/api/v1/orgs/{org_slug}/tags/sources/{source_type}/{source_id}`](#op-post-api-v1-orgs-org-slug-tags-sources-source-type-source-id) | Add org resource tag |
| PUT | [`/api/v1/orgs/{org_slug}/tags/sources/{source_type}/{source_id}`](#op-put-api-v1-orgs-org-slug-tags-sources-source-type-source-id) | Replace org resource tags |
| DELETE | [`/api/v1/orgs/{org_slug}/tags/sources/{source_type}/{source_id}/{tag}`](#op-delete-api-v1-orgs-org-slug-tags-sources-source-type-source-id-tag) | Remove org resource tag |
| GET | [`/api/v1/orgs/{org_slug}/tags/vocabulary`](#op-get-api-v1-orgs-org-slug-tags-vocabulary) | List org tag vocabulary |

### Get org resource tags {#op-get-api-v1-orgs-org-slug-tags-sources-source-type-source-id}

`GET /api/v1/orgs/{org_slug}/tags/sources/{source_type}/{source_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `source_type` | path | string | yes |
| `source_id` | path | string | yes |
| `org_slug` | path | string | yes |

#### 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 org resource tag {#op-post-api-v1-orgs-org-slug-tags-sources-source-type-source-id}

`POST /api/v1/orgs/{org_slug}/tags/sources/{source_type}/{source_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `source_type` | path | string | yes |
| `source_id` | path | string | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `tag` | string | yes |

#### 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 org resource tags {#op-put-api-v1-orgs-org-slug-tags-sources-source-type-source-id}

`PUT /api/v1/orgs/{org_slug}/tags/sources/{source_type}/{source_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `source_type` | path | string | yes |
| `source_id` | path | string | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `tags` | array of string | no |

#### 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 org resource tag {#op-delete-api-v1-orgs-org-slug-tags-sources-source-type-source-id-tag}

`DELETE /api/v1/orgs/{org_slug}/tags/sources/{source_type}/{source_id}/{tag}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `source_type` | path | string | yes |
| `source_id` | path | string | yes |
| `tag` | path | string | yes |
| `org_slug` | path | string | yes |

#### 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 |

### List org tag vocabulary {#op-get-api-v1-orgs-org-slug-tags-vocabulary}

`GET /api/v1/orgs/{org_slug}/tags/vocabulary`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org_slug` | path | string | yes |  |
| `source_type` | query | string | yes | e.g. org_service, vps, container_server |

#### 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 |
