> 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/command.md).

# Command

Commands

## Command Search

> Search this users Commands

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"command","description":"Commands"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"Command":{"properties":{"commandId":{"description":"Command Id","type":"integer"},"command":{"description":"Command Name","type":"string"},"code":{"description":"Unique Code","type":"string"},"description":{"description":"Description","type":"string"},"userId":{"description":"User Id","type":"integer"},"commandString":{"description":"Command String","type":"string"},"validationString":{"description":"Validation String","type":"string"},"displayProfileId":{"description":"DisplayProfileId if specific to a Display Profile","type":"integer"},"commandStringDisplayProfile":{"description":"Command String specific to the provided DisplayProfile","type":"string"},"validationStringDisplayProfile":{"description":"Validation String specific to the provided DisplayProfile","type":"string"},"availableOn":{"description":"A comma separated list of player types this command is available on","type":"string"},"createAlertOn":{"description":"Define if execution of this command should create an alert on success, failure, always or never.","type":"string"},"createAlertOnDisplayProfile":{"description":"Create Alert On specific to the provided DisplayProfile."},"groupsWithPermissions":{"description":"A comma separated list of groups/users with permissions to this Command","type":"string"}}}}},"paths":{"/command":{"get":{"tags":["command"],"summary":"Command Search","description":"Search this users Commands","operationId":"commandSearch","parameters":[{"schema":{"type":"integer"},"name":"commandId","in":"query","description":"Filter by Command Id","required":false},{"schema":{"type":"string"},"name":"command","in":"query","description":"Filter by Command Name","required":false},{"schema":{"type":"string"},"name":"code","in":"query","description":"Filter by Command Code","required":false},{"schema":{"type":"integer"},"name":"useRegexForName","in":"query","description":"Flag (0,1). When filtering by multiple commands in command filter, should we use regex?","required":false},{"schema":{"type":"integer"},"name":"useRegexForCode","in":"query","description":"Flag (0,1). When filtering by multiple codes in code filter, should we use regex?","required":false},{"schema":{"type":"string"},"name":"logicalOperatorName","in":"query","description":"When filtering by multiple commands in command filter,\r\n     * which logical operator should be used? AND|OR","required":false},{"schema":{"type":"string"},"name":"logicalOperatorCode","in":"query","description":"When filtering by multiple codes in code filter,\r\n     * which logical operator should be used? AND|OR","required":false}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Command"}}}}}}}}}}
```

## Command Add

> Add a Command

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"command","description":"Commands"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"Command":{"properties":{"commandId":{"description":"Command Id","type":"integer"},"command":{"description":"Command Name","type":"string"},"code":{"description":"Unique Code","type":"string"},"description":{"description":"Description","type":"string"},"userId":{"description":"User Id","type":"integer"},"commandString":{"description":"Command String","type":"string"},"validationString":{"description":"Validation String","type":"string"},"displayProfileId":{"description":"DisplayProfileId if specific to a Display Profile","type":"integer"},"commandStringDisplayProfile":{"description":"Command String specific to the provided DisplayProfile","type":"string"},"validationStringDisplayProfile":{"description":"Validation String specific to the provided DisplayProfile","type":"string"},"availableOn":{"description":"A comma separated list of player types this command is available on","type":"string"},"createAlertOn":{"description":"Define if execution of this command should create an alert on success, failure, always or never.","type":"string"},"createAlertOnDisplayProfile":{"description":"Create Alert On specific to the provided DisplayProfile."},"groupsWithPermissions":{"description":"A comma separated list of groups/users with permissions to this Command","type":"string"}}}}},"paths":{"/command":{"post":{"tags":["command"],"summary":"Command Add","description":"Add a Command","operationId":"commandAdd","responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Command"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"command":{"type":"string","description":"The Command Name"},"description":{"type":"string","description":"A description for the command"},"code":{"type":"string","description":"A unique code for this command"},"commandString":{"type":"string","description":"The Command String for this Command. Can be overridden on Display Settings."},"validationString":{"type":"string","description":"The Validation String for this Command. Can be overridden on Display Settings."},"availableOn":{"type":"string","description":"An array of Player types this Command is available on, empty for all."},"createAlertOn":{"type":"string","description":"On command execution, when should a Display alert be created?\r\n     * success, failure, always or never"}},"required":["command","code"]}}}}}}}}
```

## Edit Command

> Edit the provided command

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"command","description":"Commands"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"Command":{"properties":{"commandId":{"description":"Command Id","type":"integer"},"command":{"description":"Command Name","type":"string"},"code":{"description":"Unique Code","type":"string"},"description":{"description":"Description","type":"string"},"userId":{"description":"User Id","type":"integer"},"commandString":{"description":"Command String","type":"string"},"validationString":{"description":"Validation String","type":"string"},"displayProfileId":{"description":"DisplayProfileId if specific to a Display Profile","type":"integer"},"commandStringDisplayProfile":{"description":"Command String specific to the provided DisplayProfile","type":"string"},"validationStringDisplayProfile":{"description":"Validation String specific to the provided DisplayProfile","type":"string"},"availableOn":{"description":"A comma separated list of player types this command is available on","type":"string"},"createAlertOn":{"description":"Define if execution of this command should create an alert on success, failure, always or never.","type":"string"},"createAlertOnDisplayProfile":{"description":"Create Alert On specific to the provided DisplayProfile."},"groupsWithPermissions":{"description":"A comma separated list of groups/users with permissions to this Command","type":"string"}}}}},"paths":{"/command/{commandId}":{"put":{"tags":["command"],"summary":"Edit Command","description":"Edit the provided command","operationId":"commandEdit","parameters":[{"schema":{"type":"integer"},"name":"commandId","in":"path","description":"The Command Id to Edit","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Command"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"command":{"type":"string","description":"The Command Name"},"description":{"type":"string","description":"A description for the command"},"commandString":{"type":"string","description":"The Command String for this Command. Can be overridden on Display Settings."},"validationString":{"type":"string","description":"The Validation String for this Command. Can be overridden on Display Settings."},"availableOn":{"type":"string","description":"An array of Player types this Command is available on, empty for all."},"createAlertOn":{"type":"string","description":"On command execution, when should a Display alert be created?\r\n     * success, failure, always or never"}},"required":["command"]}}}}}}}}
```

## Delete Command

> Delete the provided command

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"command","description":"Commands"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}}},"paths":{"/command/{commandId}":{"delete":{"tags":["command"],"summary":"Delete Command","description":"Delete the provided command","operationId":"commandDelete","parameters":[{"schema":{"type":"integer"},"name":"commandId","in":"path","description":"The Command Id to Delete","required":true}],"responses":{"204":{"description":"successful operation"}}}}}}
```


---

# 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/command.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.
