> For the complete documentation index, see [llms.txt](https://docs.xibosignage.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xibosignage.com/developer/integrate/openapi/tags.md).

# Tags

Tags

## Search Tags

> Search for Tags viewable by this user

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"tags","description":"Tags"}],"servers":[{"url":"/api"}],"paths":{"/tag":{"get":{"tags":["tags"],"summary":"Search Tags","description":"Search for Tags viewable by this user","operationId":"tagSearch","parameters":[{"name":"tagId","in":"query","description":"Filter by Tag Id","required":false,"schema":{"type":"integer"}},{"name":"tag","in":"query","description":"Filter by partial Tag","required":false,"schema":{"type":"string"}},{"name":"exactTag","in":"query","description":"Filter by exact Tag","required":false,"schema":{"type":"string"}},{"name":"isSystem","in":"query","description":"Filter by isSystem flag","required":false,"schema":{"type":"integer"}},{"name":"isRequired","in":"query","description":"Filter by isRequired flag","required":false,"schema":{"type":"integer"}},{"name":"haveOptions","in":"query","description":"Filter by options: 1 = has options (IS NOT NULL), 0 = no options (IS NULL), omit for all","required":false,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","description":"Specifies which field the results are sorted by. Used together with sortDir","required":false,"schema":{"type":"string","enum":["tagId","tag","isSystem","options","isRequired"]}},{"name":"sortDir","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"successful operation","headers":{"X-Total-Count":{"description":"The total number of records","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}}}}}}},"components":{"schemas":{"Tag":{"description":"Class Tag","properties":{"tagId":{"description":"The Tag ID","type":"integer"},"tag":{"description":"The Tag Name","type":"string"},"isSystem":{"description":"Flag, whether the tag is a system tag","type":"integer"},"isRequired":{"description":"Flag, whether the tag requires additional values","type":"integer"},"options":{"description":"An array of options assigned to this Tag","type":"string","nullable":true}},"type":"object"}}}}
```

## Add a new Tag

> Add a new Tag

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"tags","description":"Tags"}],"servers":[{"url":"/api"}],"paths":{"/tag":{"post":{"tags":["tags"],"summary":"Add a new Tag","description":"Add a new Tag","operationId":"tagAdd","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"name":{"description":"Tag name","type":"string"},"isRequired":{"description":"A flag indicating whether value selection on assignment is required","type":"integer"},"options":{"description":"A comma separated string of Tag options","type":"string"}},"type":"object"}}}},"responses":{"201":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}}}}}}},"components":{"schemas":{"Tag":{"description":"Class Tag","properties":{"tagId":{"description":"The Tag ID","type":"integer"},"tag":{"description":"The Tag Name","type":"string"},"isSystem":{"description":"Flag, whether the tag is a system tag","type":"integer"},"isRequired":{"description":"Flag, whether the tag requires additional values","type":"integer"},"options":{"description":"An array of options assigned to this Tag","type":"string","nullable":true}},"type":"object"}}}}
```

## Tag search by ID

> Get the Tag object specified by the provided tagId

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"tags","description":"Tags"}],"servers":[{"url":"/api"}],"paths":{"/tag/{tagId}":{"get":{"tags":["tags"],"summary":"Tag search by ID","description":"Get the Tag object specified by the provided tagId","operationId":"TagSearchById","parameters":[{"name":"tagId","in":"path","description":"Numeric ID of the Tag to get","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}}}}}},"components":{"schemas":{"Tag":{"description":"Class Tag","properties":{"tagId":{"description":"The Tag ID","type":"integer"},"tag":{"description":"The Tag Name","type":"string"},"isSystem":{"description":"Flag, whether the tag is a system tag","type":"integer"},"isRequired":{"description":"Flag, whether the tag requires additional values","type":"integer"},"options":{"description":"An array of options assigned to this Tag","type":"string","nullable":true}},"type":"object"}}}}
```

## Edit existing Tag

> Edit existing Tag

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"tags","description":"Tags"}],"servers":[{"url":"/api"}],"paths":{"/tag/{tagId}":{"put":{"tags":["tags"],"summary":"Edit existing Tag","description":"Edit existing Tag","operationId":"tagEdit","parameters":[{"name":"tagId","in":"path","description":"The Tag ID to Edit","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"name":{"description":"Tag name","type":"string"},"isRequired":{"description":"A flag indicating whether value selection on assignment is required","type":"integer"},"options":{"description":"A comma separated string of Tag options","type":"string"}},"type":"object"}}}},"responses":{"201":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}}}}}}},"components":{"schemas":{"Tag":{"description":"Class Tag","properties":{"tagId":{"description":"The Tag ID","type":"integer"},"tag":{"description":"The Tag Name","type":"string"},"isSystem":{"description":"Flag, whether the tag is a system tag","type":"integer"},"isRequired":{"description":"Flag, whether the tag requires additional values","type":"integer"},"options":{"description":"An array of options assigned to this Tag","type":"string","nullable":true}},"type":"object"}}}}
```

## Delete Tag

> Delete a Tag

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"tags","description":"Tags"}],"servers":[{"url":"/api"}],"paths":{"/tag/{tagId}":{"delete":{"tags":["tags"],"summary":"Delete Tag","description":"Delete a Tag","operationId":"tagDelete","parameters":[{"name":"tagId","in":"path","description":"The Tag ID to delete","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}}}}}}
```

## Get Tag Item Usage Report

> Get the records for the Tag item usage report

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"tags","description":"Tags"}],"servers":[{"url":"/api"}],"paths":{"/tag/usage/{tagId}":{"get":{"tags":["tags"],"summary":"Get Tag Item Usage Report","description":"Get the records for the Tag item usage report","operationId":"TagUsageReport","parameters":[{"name":"tagId","in":"path","description":"Numeric ID of the Tag to get","required":true,"schema":{"type":"integer"}},{"name":"sortBy","in":"query","description":"Specifies which field the results are sorted by. Used together with sortDir","required":false,"schema":{"type":"string","enum":["entityId","type","name","value"]}},{"name":"sortDir","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"successful operation","headers":{"X-Total-Count":{"description":"The total number of records","schema":{"type":"integer"}}}}}}}}}
```

## Edit Tags on multiple items

> Add or remove Tags on multiple items of the same type at once

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"tags","description":"Tags"}],"servers":[{"url":"/api"}],"paths":{"/tag/{type}/multi":{"put":{"tags":["tags"],"summary":"Edit Tags on multiple items","description":"Add or remove Tags on multiple items of the same type at once","operationId":"tagEditMultiple","parameters":[{"name":"type","in":"path","description":"The type of item being tagged, e.g. layout, playlist, media, campaign, displayGroup, display","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"targetIds":{"description":"A comma separated list of item IDs to edit","type":"string"},"addTags":{"description":"A comma separated list of Tags to add","type":"string"},"removeTags":{"description":"A comma separated list of Tags to remove","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"successful operation, but one or more items failed to update","content":{"application/json":{"schema":{"properties":{"failedCount":{"description":"The number of items that failed to update","type":"integer"},"failedNames":{"description":"The names of the items that failed to update","type":"array","items":{"type":"string"}}},"type":"object"}}}},"204":{"description":"successful operation, all items updated"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xibosignage.com/developer/integrate/openapi/tags.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
