> 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"}}}}}}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
