> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# tags

> sift/tags/v2/tags.proto

<a name="sift_tags_v2_tags-proto" />

<a name="sift_tags_v2_tags-proto-services" />

## Services

*RPC methods exposed by this API.*

### TagService

| Method    | Request                               | Response                                | Description                              |
| :-------- | :------------------------------------ | :-------------------------------------- | :--------------------------------------- |
| CreateTag | [CreateTagRequest](#createtagrequest) | [CreateTagResponse](#createtagresponse) | Create a tag.                            |
| ListTags  | [ListTagsRequest](#listtagsrequest)   | [ListTagsResponse](#listtagsresponse)   | Retrieves tags using an optional filter. |

<a name="sift_tags_v2_tags-proto-messages" />

## Messages

*Data models used across requests/responses.*

### CreateTagRequest

The request for a call to TagService.CreateTag.

| Field | Type   | Label | Description                                                                |
| :---- | :----- | :---- | :------------------------------------------------------------------------- |
| name  | string |       | The name for the new tag. If the tag already exists, an error is returned. |

### CreateTagResponse

The result of a call to TagService.CreateTag.

| Field | Type        | Label | Description |
| :---- | :---------- | :---- | :---------- |
| tag   | [Tag](#tag) |       |             |

### ListTagsRequest

| Field       | Type                | Label | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| :---------- | :------------------ | :---- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| page\_size  | uint32              |       | The maximum number of tags to return. The service may return fewer than this value. If unspecified, at most 50 tags will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.                                                                                                                                                                                                                                                 |
| page\_token | string              |       | A page token, received from a previous `ListTags` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTags` must match the call that provided the page token.                                                                                                                                                                                                                                        |
| filter      | string              |       | A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string Available fields to filter by are 'name' and 'tag\_id'. For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). For more information about the fields used for filtering, please refer to [this definition](/protocol-buffers/documentation#tag). Optional. |
| order\_by   | string              |       | How to order the retrieved campaigns. Formatted as a comma-separated string i.e. "FIELD\_NAME\[ desc],...". Available fields to order\_by are `created_date` and `name`. If left empty, items are ordered by `created_date` in ascending order (oldest-first). For more information about the format of this field, read [this](https://google.aip.dev/132#ordering) Example: "created\_date desc,name"                                                     |
| tag\_type   | [TagType](#tagtype) |       | Narrows the tags selected to a specific type.                                                                                                                                                                                                                                                                                                                                                                                                               |

### ListTagsResponse

| Field             | Type        | Label    | Description                                                                                                                  |
| :---------------- | :---------- | :------- | :--------------------------------------------------------------------------------------------------------------------------- |
| tags              | [Tag](#tag) | repeated |                                                                                                                              |
| next\_page\_token | string      |          | A token, which can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages. |

### Tag

| Field                 | Type                      | Label | Description |
| :-------------------- | :------------------------ | :---- | :---------- |
| tag\_id               | string                    |       |             |
| name                  | string                    |       |             |
| created\_by\_user\_id | string                    |       |             |
| created\_date         | google.protobuf.Timestamp |       |             |

<a name="sift_tags_v2_tags-proto-enums" />

## Enums

*Allowed constant values used in message fields.*

### TagType

| Name                        | Number | Description |
| :-------------------------- | :----- | :---------- |
| TAG\_TYPE\_UNSPECIFIED      | 0      |             |
| TAG\_TYPE\_ANNOTATION       | 1      |             |
| TAG\_TYPE\_ASSET            | 2      |             |
| TAG\_TYPE\_CAMPAIGN         | 3      |             |
| TAG\_TYPE\_REPORT           | 4      |             |
| TAG\_TYPE\_REPORT\_TEMPLATE | 5      |             |
| TAG\_TYPE\_RUN              | 6      |             |
