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

# Layout

Layouts

## Search Layouts

> Search for Layouts viewable by this user

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout":{"get":{"tags":["layout"],"summary":"Search Layouts","description":"Search for Layouts viewable by this user","operationId":"layoutSearch","parameters":[{"name":"layoutId","in":"query","description":"Filter by Layout Id","required":false,"schema":{"type":"integer"}},{"name":"parentId","in":"query","description":"Filter by parent Id","required":false,"schema":{"type":"integer"}},{"name":"showDrafts","in":"query","description":"Flag indicating whether to show drafts","required":false,"schema":{"type":"integer"}},{"name":"layout","in":"query","description":"Filter by partial Layout name","required":false,"schema":{"type":"string"}},{"name":"userId","in":"query","description":"Filter by user Id","required":false,"schema":{"type":"integer"}},{"name":"retired","in":"query","description":"Filter by retired flag","required":false,"schema":{"type":"integer"}},{"name":"tags","in":"query","description":"Filter by Tags","required":false,"schema":{"type":"string"}},{"name":"exactTags","in":"query","description":"A flag indicating whether to treat the tags filter as an exact match","required":false,"schema":{"type":"integer"}},{"name":"logicalOperator","in":"query","description":"When filtering by multiple Tags, which logical operator should be used? AND|OR","required":false,"schema":{"type":"string"}},{"name":"ownerUserGroupId","in":"query","description":"Filter by users in this UserGroupId","required":false,"schema":{"type":"integer"}},{"name":"publishedStatusId","in":"query","description":"Filter by published status id, 1 - Published, 2 - Draft","required":false,"schema":{"type":"integer"}},{"name":"embed","in":"query","description":"Embed related data such as regions, playlists, widgets, tags, campaigns, permissions","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","description":"Get all Layouts for a given campaignId","required":false,"schema":{"type":"integer"}},{"name":"folderId","in":"query","description":"Filter by Folder ID","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":["layoutId","layout","publishedStatus","enableStat","duration","owner","modifiedDt","campaignId","groupsWithPermissions"]}},{"name":"sortDir","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Layout"}}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Add a Layout

> Add a new Layout to the CMS

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout":{"post":{"tags":["layout"],"summary":"Add a Layout","description":"Add a new Layout to the CMS","operationId":"layoutAdd","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"name":{"description":"The layout name","type":"string"},"description":{"description":"The layout description","type":"string"},"layoutId":{"description":"If the Layout should be created with a Template, provide the ID, otherwise don't provide","type":"integer"},"resolutionId":{"description":"If a Template is not provided, provide the resolutionId for this Layout.","type":"integer"},"returnDraft":{"description":"Should we return the Draft Layout or the Published Layout on Success?","type":"boolean"},"code":{"description":"Code identifier for this Layout","type":"string"},"folderId":{"description":"Folder ID to which this object should be assigned to","type":"integer"}},"type":"object"}}}},"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Clear Layout

> Clear a draft layouts canvas of all widgets and elements, leaving it blank.

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/{layoutId}":{"post":{"tags":["layout"],"summary":"Clear Layout","description":"Clear a draft layouts canvas of all widgets and elements, leaving it blank.","operationId":"layoutClear","parameters":[{"name":"layoutId","in":"path","description":"The Layout ID to Clear, must be a draft.","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Edit Layout

> Edit a Layout

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/{layoutId}":{"put":{"tags":["layout"],"summary":"Edit Layout","description":"Edit a Layout","operationId":"layoutEdit","parameters":[{"name":"layoutId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["name"],"properties":{"name":{"description":"The Layout Name","type":"string"},"description":{"description":"The Layout Description","type":"string"},"tags":{"description":"A comma separated list of Tags","type":"string"},"retired":{"description":"A flag indicating whether this Layout is retired.","type":"integer"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"folderId":{"description":"Folder ID to which this object should be assigned to","type":"integer"}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Delete Layout

> Delete a Layout

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/{layoutId}":{"delete":{"tags":["layout"],"summary":"Delete Layout","description":"Delete a Layout","operationId":"layoutDelete","parameters":[{"name":"layoutId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}}}}}}
```

## Edit Layout Background

> Edit a Layout Background

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/background/{layoutId}":{"put":{"tags":["layout"],"summary":"Edit Layout Background","description":"Edit a Layout Background","operationId":"layoutEditBackground","parameters":[{"name":"layoutId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["backgroundColor","backgroundzIndex"],"properties":{"backgroundColor":{"description":"A HEX color to use as the background color of this Layout.","type":"string"},"backgroundImageId":{"description":"A media ID to use as the background image for this Layout.","type":"integer"},"backgroundzIndex":{"description":"The Layer Number to use for the background.","type":"integer"},"resolutionId":{"description":"The Resolution ID to use on this Layout.","type":"integer"}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Apply Template

> Apply a new Template to an existing Layout, replacing it.

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/applyTemplate/{layoutId}":{"put":{"tags":["layout"],"summary":"Apply Template","description":"Apply a new Template to an existing Layout, replacing it.","operationId":"layoutApplyTemplate","parameters":[{"name":"layoutId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"templateId":{"description":"If the Layout should be created with a Template, provide the ID, otherwise don't provide","type":"integer"}},"type":"object"}}}},"responses":{"204":{"description":"successful operation"}}}}}}
```

## Retire Layout

> Retire a Layout so that it isn't available to Schedule. Existing Layouts will still be played

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/retire/{layoutId}":{"put":{"tags":["layout"],"summary":"Retire Layout","description":"Retire a Layout so that it isn't available to Schedule. Existing Layouts will still be played","operationId":"layoutRetire","parameters":[{"name":"layoutId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}}}}}}
```

## Unretire Layout

> Retire a Layout so that it isn't available to Schedule. Existing Layouts will still be played

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/unretire/{layoutId}":{"put":{"tags":["layout"],"summary":"Unretire Layout","description":"Retire a Layout so that it isn't available to Schedule. Existing Layouts will still be played","operationId":"layoutUnretire","parameters":[{"name":"layoutId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}}}}}}
```

## Enable Stats Collection

> Set Enable Stats Collection? to use for the collection of Proof of Play statistics for a Layout.

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/setenablestat/{layoutId}":{"put":{"tags":["layout"],"summary":"Enable Stats Collection","description":"Set Enable Stats Collection? to use for the collection of Proof of Play statistics for a Layout.","operationId":"layoutSetEnableStat","parameters":[{"name":"layoutId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["enableStat"],"properties":{"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"}},"type":"object"}}}},"responses":{"204":{"description":"successful operation"}}}}}}
```

## Copy Layout

> Copy a Layout, providing a new name if applicable

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/copy/{layoutId}":{"post":{"tags":["layout"],"summary":"Copy Layout","description":"Copy a Layout, providing a new name if applicable","operationId":"layoutCopy","parameters":[{"name":"layoutId","in":"path","description":"The Layout ID to Copy","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["name","copyMediaFiles"],"properties":{"name":{"description":"The name for the new Layout","type":"string"},"description":{"description":"The Description for the new Layout","type":"string"},"copyMediaFiles":{"description":"Flag indicating whether to make new Copies of all Media Files assigned to the Layout being Copied","type":"integer"}},"type":"object"}}}},"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Tag Layout

> Tag a Layout with one or more tags

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/{layoutId}/tag":{"post":{"tags":["layout"],"summary":"Tag Layout","description":"Tag a Layout with one or more tags","operationId":"layoutTag","parameters":[{"name":"layoutId","in":"path","description":"The Layout Id to Tag","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["tag"],"properties":{"tag":{"description":"An array of tags","type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Untag Layout

> Untag a Layout with one or more tags

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/{layoutId}/untag":{"post":{"tags":["layout"],"summary":"Untag Layout","description":"Untag a Layout with one or more tags","operationId":"layoutUntag","parameters":[{"name":"layoutId","in":"path","description":"The Layout Id to Untag","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["tag"],"properties":{"tag":{"description":"An array of tags","type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Layout Status

> Calculate the Layout status and return a Layout

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/status/{layoutId}":{"get":{"tags":["layout"],"summary":"Layout Status","description":"Calculate the Layout status and return a Layout","operationId":"layoutStatus","parameters":[{"name":"layoutId","in":"path","description":"The Layout Id to get the status","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Checkout Layout

> Checkout a Layout so that it can be edited. The original Layout will still be played

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/checkout/{layoutId}":{"put":{"tags":["layout"],"summary":"Checkout Layout","description":"Checkout a Layout so that it can be edited. The original Layout will still be played","operationId":"layoutCheckout","parameters":[{"name":"layoutId","in":"path","description":"The Layout ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Publish Layout

> Publish a Layout, discarding the original

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/publish/{layoutId}":{"put":{"tags":["layout"],"summary":"Publish Layout","description":"Publish a Layout, discarding the original","operationId":"layoutPublish","parameters":[{"name":"layoutId","in":"path","description":"The Layout ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"publishNow":{"description":"Flag, indicating whether to publish layout now","type":"integer"},"publishDate":{"description":"The date/time at which layout should be published","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Discard Layout

> Discard a Layout restoring the original

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/discard/{layoutId}":{"put":{"tags":["layout"],"summary":"Discard Layout","description":"Discard a Layout restoring the original","operationId":"layoutDiscard","parameters":[{"name":"layoutId","in":"path","description":"The Layout ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Add a Full Screen Layout

> Add a new full screen Layout with specified Media/Playlist

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/layout/fullscreen":{"post":{"tags":["layout"],"summary":"Add a Full Screen Layout","description":"Add a new full screen Layout with specified Media/Playlist","operationId":"layoutAddFullScreen","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["id","type"],"properties":{"id":{"description":"The Media or Playlist ID that should be added to this Layout","type":"integer"},"type":{"description":"The type of Layout to be created = media or playlist","type":"string"},"resolutionId":{"description":"The Id of the resolution for this Layout, defaults to 1080p for playlist and closest resolution match for Media","type":"integer"},"backgroundColor":{"description":"A HEX color to use as the background color of this Layout. Default is black #000","type":"string"},"layoutDuration":{"description":"Use with media type, to specify the duration this Media should play in one loop","type":"boolean"}},"type":"object"}}}},"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Add Region

> Add a Region to a Layout

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/region/{id}":{"post":{"tags":["layout"],"summary":"Add Region","description":"Add a Region to a Layout","operationId":"regionAdd","parameters":[{"name":"id","in":"path","description":"The Layout ID to add the Region to","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"type":{"description":"The type of region this should be, zone, frame, playlist or canvas. Default = frame.","type":"string"},"width":{"description":"The Width, default 250","type":"integer"},"height":{"description":"The Height","type":"integer"},"top":{"description":"The Top Coordinate","type":"integer"},"left":{"description":"The Left Coordinate","type":"integer"}},"type":"object"}}}},"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Region"}}}}}}}},"components":{"schemas":{"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Edit Region

> Edit Region

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/region/{id}":{"put":{"tags":["layout"],"summary":"Edit Region","description":"Edit Region","operationId":"regionEdit","parameters":[{"name":"id","in":"path","description":"The Region ID to Edit","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["loop"],"properties":{"width":{"description":"The Width, default 250","type":"integer"},"height":{"description":"The Height","type":"integer"},"top":{"description":"The Top Coordinate","type":"integer"},"left":{"description":"The Left Coordinate","type":"integer"},"zIndex":{"description":"The Layer for this Region","type":"integer"},"transitionType":{"description":"The Transition Type. Must be a valid transition code as returned by /transition","type":"string"},"transitionDuration":{"description":"The transition duration in milliseconds if required by the transition type","type":"integer"},"transitionDirection":{"description":"The transition direction if required by the transition type.","type":"string"},"loop":{"description":"Flag indicating whether this region should loop if there is only 1 media item in the timeline","type":"integer"}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Region"}}}}}}}},"components":{"schemas":{"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Region Delete

> Delete an existing region

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/region/{regionId}":{"delete":{"tags":["layout"],"summary":"Region Delete","description":"Delete an existing region","operationId":"regionDelete","parameters":[{"name":"regionId","in":"path","description":"The Region ID to Delete","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}}}}}}
```

## Position Regions

> Position all regions for a Layout

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/region/position/all/{layoutId}":{"put":{"tags":["layout"],"summary":"Position Regions","description":"Position all regions for a Layout","operationId":"regionPositionAll","parameters":[{"name":"layoutId","in":"path","description":"The Layout ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"required":["regions"],"properties":{"regions":{"description":"Array of regions and their new positions. Each array element should be json encoded and have regionId, top, left, width and height.","type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}},"components":{"schemas":{"Layout":{"description":"Class Layout","properties":{"layoutId":{"description":"The layoutId","type":"integer"},"ownerId":{"description":"The userId of the Layout Owner","type":"integer"},"campaignId":{"description":"The id of the Layout's dedicated Campaign","type":"integer"},"parentId":{"description":"The parentId, if this Layout has a draft","type":"integer"},"publishedStatusId":{"description":"The Status Id","type":"integer"},"publishedStatus":{"description":"The Published Status (Published, Draft or Pending Approval","type":"string"},"publishedDate":{"description":"The Published Date","type":"string"},"backgroundImageId":{"description":"The id of the image media set as the background","type":"integer"},"schemaVersion":{"description":"The XLF schema version","type":"integer"},"layout":{"description":"The name of the Layout","type":"string"},"description":{"description":"The description of the Layout","type":"string"},"backgroundColor":{"description":"A HEX string representing the Layout background color","type":"string"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"status":{"description":"Flag indicating the Layout status","type":"integer"},"retired":{"description":"Flag indicating whether the Layout is retired","type":"integer"},"backgroundzIndex":{"description":"The Layer that the background should occupy","type":"integer"},"width":{"description":"The Layout Width","type":"number","format":"double"},"height":{"description":"The Layout Height","type":"number","format":"double"},"orientation":{"description":"The Layout Orientation","type":"string"},"displayOrder":{"description":"If this Layout has been requested by Campaign, then this is the display order of the Layout within the Campaign","type":"integer"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"statusMessage":{"description":"A status message detailing any errors with the layout","type":"string"},"enableStat":{"description":"Flag indicating whether the Layout stat is enabled","type":"integer"},"autoApplyTransitions":{"description":"Flag indicating whether the default transitions should be applied to this Layout","type":"integer"},"code":{"description":"Code identifier for this Layout","type":"string"},"isLocked":{"description":"Is this layout locked by another user?","type":"boolean"},"regions":{"description":"An array of Regions belonging to this Layout","type":"array","items":{"$ref":"#/components/schemas/Region"}},"tags":{"description":"Tags associated with this Layout, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"folderId":{"description":"The id of the Folder this Layout belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Layout","type":"integer"}},"type":"object"},"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Add drawer Region

> Add a drawer Region to a Layout

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/region/drawer/{id}":{"post":{"tags":["layout"],"summary":"Add drawer Region","description":"Add a drawer Region to a Layout","operationId":"regionDrawerAdd","parameters":[{"name":"id","in":"path","description":"The Layout ID to add the Region to","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Region"}}}}}}}},"components":{"schemas":{"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```

## Save Drawer

> Save Drawer

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"paths":{"/region/drawer/{id}":{"put":{"tags":["layout"],"summary":"Save Drawer","description":"Save Drawer","operationId":"regionDrawerSave","parameters":[{"name":"id","in":"path","description":"The Drawer ID to Save","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"width":{"description":"The Width, default 250","type":"integer"},"height":{"description":"The Height","type":"integer"}},"type":"object"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Region"}}}}}}}},"components":{"schemas":{"Region":{"description":"Class Region","properties":{"regionId":{"description":"The ID of this region","type":"integer"},"layoutId":{"description":"The Layout ID this region belongs to","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Region","type":"integer"},"type":{"description":"Region Type, zone, playlist, frame or canvas","type":"string"},"name":{"description":"The name of this Region","type":"string"},"width":{"description":"Width of the region","type":"number","format":"double"},"height":{"description":"Height of the Region","type":"number","format":"double"},"top":{"description":"The top coordinate of the Region","type":"number","format":"double"},"left":{"description":"The left coordinate of the Region","type":"number","format":"double"},"zIndex":{"description":"The z-index of the Region to control Layering","type":"integer"},"syncKey":{"description":"The syncKey of this Region","type":"string"},"regionOptions":{"description":"An array of Region Options","type":"array","items":{"$ref":"#/components/schemas/RegionOption"}},"permissions":{"description":"An array of Permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"duration":{"description":"A read-only estimate of this Regions's total duration in seconds. This is valid when the parent layout status is 1 or 2.","type":"integer"},"isDrawer":{"description":"Flag, whether this region is used as an interactive drawer attached to a layout.","type":"integer"},"regionPlaylist":{"$ref":"#/components/schemas/Playlist"}},"type":"object"},"RegionOption":{"description":"Class RegionOption","properties":{"regionId":{"description":"The regionId that this Option applies to","type":"integer"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"Permission":{"description":"Class Permission","properties":{"permissionId":{"description":"The ID of this Permission Record","type":"integer"},"entityId":{"description":"The Entity ID that this Permission refers to","type":"integer"},"groupId":{"description":"The User Group ID that this permission refers to","type":"integer"},"objectId":{"description":"The object ID that this permission refers to","type":"integer"},"isUser":{"description":"A flag indicating whether the groupId refers to a user specific group","type":"integer"},"entity":{"description":"The entity name that this refers to","type":"string"},"objectIdString":{"description":"Legacy for when the Object ID is a string","type":"string"},"group":{"description":"The group name that this refers to","type":"string"},"view":{"description":"A flag indicating whether view permission is granted","type":"integer"},"edit":{"description":"A flag indicating whether edit permission is granted","type":"integer"},"delete":{"description":"A flag indicating whether delete permission is granted","type":"integer"},"modifyPermissions":{"description":"A flag indicating whether modify permission permission is granted.","type":"integer"}},"type":"object"},"Playlist":{"description":"Class Playlist","properties":{"playlistId":{"description":"The ID of this Playlist","type":"integer"},"ownerId":{"description":"The userId of the User that owns this Playlist","type":"integer"},"name":{"description":"The Name of the Playlist","type":"string"},"regionId":{"description":"The RegionId if this Playlist is specific to a Region","type":"integer"},"isDynamic":{"description":"Flag indicating if this is a dynamic Playlist","type":"integer"},"filterMediaName":{"description":"Filter Name for a Dynamic Playlist","type":"string"},"filterMediaNameLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Plalust names? OR|AND","type":"string"},"filterMediaTags":{"description":"Filter Tags for a Dynamic Playlist","type":"string"},"filterExactTags":{"description":"Flag indicating whether to filter by exact Tag match","type":"integer"},"filterMediaTagsLogicalOperator":{"description":"Which logical operator should be used when filtering by multiple Tags? OR|AND","type":"string"},"filterFolderId":{"description":"The ID of the folder to filter media items by","type":"integer"},"maxNumberOfItems":{"description":"Maximum number of Media items matching dynamic Playlist filters","type":"integer"},"createdDt":{"description":"The datetime this entity was created","type":"string"},"modifiedDt":{"description":"The datetime this entity was last modified","type":"string"},"duration":{"description":"A read-only estimate of this Layout's total duration in seconds. This is equal to the longest region duration and is valid when the layout status is 1 or 2.","type":"integer"},"requiresDurationUpdate":{"description":"Flag indicating whether this Playlists requires a duration update","type":"integer"},"enableStat":{"description":"The option to enable the collection of Playlist Proof of Play statistics","type":"string"},"tags":{"description":"Tags associated with this Playlist, array of TagLink objects","type":"array","items":{"$ref":"#/components/schemas/TagLink"}},"widgets":{"description":"An array of Widgets assigned to this Playlist","type":"array","items":{"$ref":"#/components/schemas/Widget"}},"permissions":{"description":"An array of permissions","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"folderId":{"description":"The id of the Folder this Playlist belongs to","type":"integer"},"permissionsFolderId":{"description":"The id of the Folder responsible for providing permissions for this Playlist","type":"integer"}},"type":"object"},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}},"type":"object"},"Widget":{"description":"Class Widget","properties":{"widgetId":{"description":"The Widget ID","type":"integer"},"playlistId":{"description":"The ID of the Playlist this Widget belongs to","type":"integer"},"ownerId":{"description":"The ID of the User that owns this Widget","type":"integer"},"type":{"description":"The Module Type Code","type":"string"},"duration":{"description":"The duration in seconds this widget should be shown","type":"integer"},"displayOrder":{"description":"The display order of this widget","type":"integer"},"useDuration":{"description":"Flag indicating if this widget has a duration that should be used","type":"integer"},"calculatedDuration":{"description":"Calculated Duration of this widget after taking into account the useDuration flag","type":"integer"},"createdDt":{"description":"The datetime the Layout was created","type":"string"},"modifiedDt":{"description":"The datetime the Layout was last modified","type":"string"},"fromDt":{"description":"Widget From Date","type":"integer"},"toDt":{"description":"Widget To Date","type":"integer"},"schemaVersion":{"description":"Widget Schema Version","type":"integer"},"transitionIn":{"description":"Transition Type In","type":"integer"},"transitionOut":{"description":"Transition Type out","type":"integer"},"transitionDurationIn":{"description":"Transition duration in","type":"integer"},"transitionDurationOut":{"description":"Transition duration out","type":"integer"},"widgetOptions":{"description":"An array of Widget Options","type":"array","items":{"$ref":"#/components/schemas/WidgetOption"}},"mediaIds":{"description":"An array of MediaIds this widget is linked to","type":"array","items":{"type":"integer"}},"audio":{"description":"An array of Audio MediaIds this widget is linked to","type":"array","items":{"$ref":"#/components/schemas/WidgetAudio"}},"permissions":{"description":"An array of permissions for this widget","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"playlist":{"description":"The name of the Playlist this Widget is on","type":"string"}},"type":"object"},"WidgetOption":{"description":"Class WidgetOption","properties":{"widgetId":{"description":"The Widget ID that this Option belongs to","type":"integer"},"type":{"description":"The option type, either attrib or raw","type":"string"},"option":{"description":"The option name","type":"string"},"value":{"description":"The option value","type":"string"}},"type":"object"},"WidgetAudio":{"description":"Class WidgetAudio","properties":{"widgetId":{"description":"The Widget Id","type":"integer"},"mediaId":{"description":"The Media Id","type":"integer"},"volume":{"description":"The percentage volume","type":"integer"},"loop":{"description":"Flag indicating whether to loop","type":"integer"}},"type":"object"}}}}
```


---

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