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

# Module

Modules and Widgets

## Module Search

> Get a list of all modules available to this CMS

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"module","description":"Modules and Widgets"}],"servers":[{"url":"/api"}],"paths":{"/module":{"get":{"tags":["module"],"summary":"Module Search","description":"Get a list of all modules available to this CMS","operationId":"moduleSearch","parameters":[{"name":"moduleId","in":"query","description":"Filter by module ID","required":false,"schema":{"type":"integer"}},{"name":"name","in":"query","description":"Filter by module name","required":false,"schema":{"type":"string"}},{"name":"keyword","in":"query","description":"Filter by module name, ID, or description","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","description":"Specifies which field the results are sorted by. Used together with sortDir","required":false,"schema":{"type":"string","enum":["name","description","regionSpecific","defaultDuration","previewEnabled","assignable","enabled","isError"]}},{"name":"sortDir","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"start","in":"query","description":"The offset to start results from (for pagination)","required":false,"schema":{"type":"integer"}},{"name":"length","in":"query","description":"The number of records to return (page size)","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","headers":{"X-Total-Count":{"description":"The total number of records","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Module"}}}}}}}},"components":{"schemas":{"Module":{"description":"Class Module","properties":{"moduleId":{"description":"The ID of this Module","type":"integer"},"name":{"description":"Module Name","type":"string"},"author":{"description":"Module Author","type":"string"},"description":{"description":"Description of the Module","type":"string"},"icon":{"description":"An icon to use in the toolbar","type":"string"},"type":{"description":"The type code for this module","type":"string"},"legacyTypes":{"description":"Legacy type codes for this module","type":"array","items":{"$ref":"#/components/schemas/LegacyType"}},"dataType":{"description":"The data type of the data expected to be returned by this modules data provider","type":"string"},"group":{"description":"The group details for this module","type":"array","items":{"type":"string"}},"dataCacheKey":{"description":"The cache key used when requesting data","type":"string"},"fallbackData":{"description":"Is fallback data allowed for this module? Only applicable for a Data Widget","type":"integer"},"regionSpecific":{"description":"Is specific to a Layout or can be uploaded to the Library?","type":"integer"},"schemaVersion":{"description":"The schema version of the module","type":"integer"},"compatibilityClass":{"description":"The compatibility class of the module","type":"string"},"showIn":{"description":"A flag indicating whether the module should be excluded from the Layout Editor","type":"string"},"assignable":{"description":"A flag indicating whether the module is assignable to a Layout","type":"integer"},"hasThumbnail":{"description":"Does this module have a thumbnail to render?","type":"integer"},"thumbnail":{"description":"This is the location to a module's thumbnail","type":"string"},"renderAs":{"description":"Should be rendered natively by the Player or via the CMS (native|html)","type":"string"},"class":{"description":"Class Name including namespace","type":"string"},"validatorClass":{"description":"Validator class name including namespace","type":"array","items":{"type":"string"}},"properties":{"description":"Properties to display in the property panel and supply to stencils","type":"array","items":{"$ref":"#/components/schemas/Property"}},"onInitialize":{"description":"JavaScript function run when a module is initialised, before data is returned","type":"string"},"onParseData":{"description":"Data Parser run against each data item applicable when a dataType is present","type":"string"},"onDataLoad":{"description":"A load function to run when the widget first fetches data","type":"string"},"onRender":{"description":"JavaScript function run when a module is rendered, after data has been returned","type":"string"},"onVisible":{"description":"JavaScript function run when a module becomes visible","type":"string"},"sampleData":{"description":"Optional sample data item, only applicable when a dataType is present","type":"string"},"enabled":{"description":"A flag indicating whether this module is enabled","type":"integer"},"previewEnabled":{"description":"A flag indicating whether the Layout designer should render a preview of this module","type":"integer"},"defaultDuration":{"description":"The default duration for Widgets of this Module when the user has not set a duration.","type":"integer"},"settings":{"description":"An array of additional module specific settings","type":"array","items":{"$ref":"#/components/schemas/Property"}},"propertyGroups":{"description":"An array of additional module specific group properties","type":"array","items":{"$ref":"#/components/schemas/PropertyGroup"}},"requiredElements":{"description":"An array of required elements","type":"array","items":{"type":"string"}},"isInstalled":{"description":"$isInstalled Is this module installed?","type":"boolean"},"isError":{"description":"$isError Does this module have any errors?","type":"boolean"},"errors":{"description":"$errors An array of errors this module has.","type":"array","items":{"type":"string"}}},"type":"object"},"LegacyType":{"description":"A Legacy Type","properties":{"name":{},"condition":{}},"type":"object"},"Property":{"description":"A Property","properties":{"id":{"description":"ID, saved as a widget option","type":"string"},"type":{"description":"Type, determines the field type","type":"string"},"title":{"description":"Title: shown in the property panel","type":"string"},"helpText":{"description":"Help Text: shown in the property panel","type":"string"},"default":{"description":"An optional default value","type":"string"}},"type":"object"},"PropertyGroup":{"description":"A class representing an instance of a group property to put a property in assigned Tab","properties":{"id":{},"expanded":{},"title":{},"helpText":{}},"type":"object"}}}}
```

## Module Search By ID

> Get the Module object specified by the provided moduleId

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"module","description":"Modules and Widgets"}],"servers":[{"url":"/api"}],"paths":{"/module/{moduleId}":{"get":{"tags":["module"],"summary":"Module Search By ID","description":"Get the Module object specified by the provided moduleId","operationId":"ModuleSearchById","parameters":[{"name":"moduleId","in":"path","description":"ID of the Module to get","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Module"}}}}}}}},"components":{"schemas":{"Module":{"description":"Class Module","properties":{"moduleId":{"description":"The ID of this Module","type":"integer"},"name":{"description":"Module Name","type":"string"},"author":{"description":"Module Author","type":"string"},"description":{"description":"Description of the Module","type":"string"},"icon":{"description":"An icon to use in the toolbar","type":"string"},"type":{"description":"The type code for this module","type":"string"},"legacyTypes":{"description":"Legacy type codes for this module","type":"array","items":{"$ref":"#/components/schemas/LegacyType"}},"dataType":{"description":"The data type of the data expected to be returned by this modules data provider","type":"string"},"group":{"description":"The group details for this module","type":"array","items":{"type":"string"}},"dataCacheKey":{"description":"The cache key used when requesting data","type":"string"},"fallbackData":{"description":"Is fallback data allowed for this module? Only applicable for a Data Widget","type":"integer"},"regionSpecific":{"description":"Is specific to a Layout or can be uploaded to the Library?","type":"integer"},"schemaVersion":{"description":"The schema version of the module","type":"integer"},"compatibilityClass":{"description":"The compatibility class of the module","type":"string"},"showIn":{"description":"A flag indicating whether the module should be excluded from the Layout Editor","type":"string"},"assignable":{"description":"A flag indicating whether the module is assignable to a Layout","type":"integer"},"hasThumbnail":{"description":"Does this module have a thumbnail to render?","type":"integer"},"thumbnail":{"description":"This is the location to a module's thumbnail","type":"string"},"renderAs":{"description":"Should be rendered natively by the Player or via the CMS (native|html)","type":"string"},"class":{"description":"Class Name including namespace","type":"string"},"validatorClass":{"description":"Validator class name including namespace","type":"array","items":{"type":"string"}},"properties":{"description":"Properties to display in the property panel and supply to stencils","type":"array","items":{"$ref":"#/components/schemas/Property"}},"onInitialize":{"description":"JavaScript function run when a module is initialised, before data is returned","type":"string"},"onParseData":{"description":"Data Parser run against each data item applicable when a dataType is present","type":"string"},"onDataLoad":{"description":"A load function to run when the widget first fetches data","type":"string"},"onRender":{"description":"JavaScript function run when a module is rendered, after data has been returned","type":"string"},"onVisible":{"description":"JavaScript function run when a module becomes visible","type":"string"},"sampleData":{"description":"Optional sample data item, only applicable when a dataType is present","type":"string"},"enabled":{"description":"A flag indicating whether this module is enabled","type":"integer"},"previewEnabled":{"description":"A flag indicating whether the Layout designer should render a preview of this module","type":"integer"},"defaultDuration":{"description":"The default duration for Widgets of this Module when the user has not set a duration.","type":"integer"},"settings":{"description":"An array of additional module specific settings","type":"array","items":{"$ref":"#/components/schemas/Property"}},"propertyGroups":{"description":"An array of additional module specific group properties","type":"array","items":{"$ref":"#/components/schemas/PropertyGroup"}},"requiredElements":{"description":"An array of required elements","type":"array","items":{"type":"string"}},"isInstalled":{"description":"$isInstalled Is this module installed?","type":"boolean"},"isError":{"description":"$isError Does this module have any errors?","type":"boolean"},"errors":{"description":"$errors An array of errors this module has.","type":"array","items":{"type":"string"}}},"type":"object"},"LegacyType":{"description":"A Legacy Type","properties":{"name":{},"condition":{}},"type":"object"},"Property":{"description":"A Property","properties":{"id":{"description":"ID, saved as a widget option","type":"string"},"type":{"description":"Type, determines the field type","type":"string"},"title":{"description":"Title: shown in the property panel","type":"string"},"helpText":{"description":"Help Text: shown in the property panel","type":"string"},"default":{"description":"An optional default value","type":"string"}},"type":"object"},"PropertyGroup":{"description":"A class representing an instance of a group property to put a property in assigned Tab","properties":{"id":{},"expanded":{},"title":{},"helpText":{}},"type":"object"}}}}
```

## Get Module Properties

> Get a module properties which are needed to for the editWidget call

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"module","description":"Modules and Widgets"}],"servers":[{"url":"/api"}],"paths":{"/module/properties/{id}":{"get":{"tags":["module"],"summary":"Get Module Properties","description":"Get a module properties which are needed to for the editWidget call","operationId":"getModuleProperties","parameters":[{"name":"id","in":"path","description":"The ModuleId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Property"}}}}}}}},"components":{"schemas":{"Property":{"description":"A Property","properties":{"id":{"description":"ID, saved as a widget option","type":"string"},"type":{"description":"Type, determines the field type","type":"string"},"title":{"description":"Title: shown in the property panel","type":"string"},"helpText":{"description":"Help Text: shown in the property panel","type":"string"},"default":{"description":"An optional default value","type":"string"}},"type":"object"}}}}
```

## Module Template Search

> Get a list of templates available for a particular data type

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"module","description":"Modules and Widgets"}],"servers":[{"url":"/api"}],"paths":{"/module/templates/{dataType}":{"get":{"tags":["module"],"summary":"Module Template Search","description":"Get a list of templates available for a particular data type","operationId":"moduleTemplateSearch","parameters":[{"name":"dataType","in":"path","description":"DataType to return templates for","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Type to return templates for","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"An array of module templates for the provided datatype","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleTemplate"}}}}}}}},"components":{"schemas":{"ModuleTemplate":{"description":"Represents a module template","properties":{"templateId":{"description":"The templateId","type":"string"},"type":{"description":"Type of template (static|element|stencil)","type":"string"},"extends":{"oneOf":[{"$ref":"#/components/schemas/Extend"}],"nullable":true,"description":"If this template extends another"},"dataType":{"description":"The datatype of this template","type":"string"},"title":{"description":"The title","type":"string"},"description":{"description":"Description of the Module Template","type":"string"},"icon":{"description":"Icon","type":"string"},"thumbnail":{"description":"Thumbnail\nthis is the location to a module template's thumbnail, which should be added to the installation\nrelative to the module class file.","type":"string"},"showIn":{"description":"A flag indicating whether the template should be excluded from the Layout Editor","type":"string"},"properties":{"description":"Properties","type":"array","items":{"$ref":"#/components/schemas/Property"},"nullable":true},"isVisible":{"description":"Is Visible?","type":"boolean"},"isEnabled":{"description":"Is Enabled?","type":"boolean"},"propertyGroups":{"description":"An array of additional module specific group properties","type":"array","items":{"$ref":"#/components/schemas/PropertyGroup"}},"stencil":{"oneOf":[{"$ref":"#/components/schemas/Stencil"}],"nullable":true,"description":"A stencil, if needed"},"assets":{"type":"array","items":{"type":"Xibo\\Widget\\Definition\\Asset"}},"groupsWithPermissions":{"description":"A comma separated list of groups/users with permissions to this template","type":"string"}},"type":"object"},"Extend":{"description":"A class representing one template extending another","properties":{"template":{},"override":{},"with":{},"escapeHtml":{}},"type":"object"},"Property":{"description":"A Property","properties":{"id":{"description":"ID, saved as a widget option","type":"string"},"type":{"description":"Type, determines the field type","type":"string"},"title":{"description":"Title: shown in the property panel","type":"string"},"helpText":{"description":"Help Text: shown in the property panel","type":"string"},"default":{"description":"An optional default value","type":"string"}},"type":"object"},"PropertyGroup":{"description":"A class representing an instance of a group property to put a property in assigned Tab","properties":{"id":{},"expanded":{},"title":{},"helpText":{}},"type":"object"},"Stencil":{"description":"A Stencil is a template which is rendered in the server and/or client\nit can optionally have properties and/or elements","properties":{"elements":{"type":"array","items":{"$ref":"#/components/schemas/Element"}},"twig":{"type":"string","nullable":true},"hbs":{"type":"string","nullable":true},"head":{"type":"string","nullable":true},"style":{"type":"string","nullable":true},"hbsId":{"type":"string","nullable":true},"width":{"description":"Optional positional information if contained as part of an element group","type":"number","format":"double"},"height":{"description":"Optional positional information if contained as part of an element group","type":"number","format":"double"},"gapBetweenHbs":{"description":"Optional positional information if contained as part of an element group","type":"number","format":"double"},"elementGroups":{"description":"An array of element groups","type":"array","items":{"$ref":"#/components/schemas/ElementGroup"}}},"type":"object"},"Element":{"description":"A class representing an instance of an element template","properties":{"id":{},"top":{},"left":{},"width":{},"height":{},"rotation":{},"layer":{},"elementGroupId":{},"properties":{"type":"array","items":{"type":"string"}}},"type":"object"},"ElementGroup":{"description":"A class representing an instance of a group of elements","properties":{"id":{},"top":{},"left":{},"width":{},"height":{},"layer":{},"title":{},"slot":{},"pinSlot":{}},"type":"object"}}}}
```

## Get Module Template Properties

> Get a module template properties which are needed to for the editWidget call

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"module","description":"Modules and Widgets"}],"servers":[{"url":"/api"}],"paths":{"/module/template/{dataType}/properties/{id}":{"get":{"tags":["module"],"summary":"Get Module Template Properties","description":"Get a module template properties which are needed to for the editWidget call","operationId":"getModuleTemplateProperties","parameters":[{"name":"dataType","in":"path","description":"The Template DataType","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The Template Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}}}
```


---

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