> 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.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout":{"get":{"tags":["layout"],"summary":"Search Layouts","description":"Search for Layouts viewable by this user","operationId":"layoutSearch","parameters":[{"schema":{"type":"integer"},"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":"string"},"name":"layout","in":"query","description":"Filter by partial Layout name","required":false},{"schema":{"type":"integer"},"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":"string"},"name":"tags","in":"query","description":"Filter by Tags","required":false},{"schema":{"type":"integer"},"name":"exactTags","in":"query","description":"A flag indicating whether to treat the tags filter as an exact match","required":false},{"schema":{"type":"string"},"name":"logicalOperator","in":"query","description":"When filtering by multiple Tags, which logical operator should be used? AND|OR","required":false},{"schema":{"type":"integer"},"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":"string"},"name":"embed","in":"query","description":"Embed related data such as regions, playlists, widgets, tags, campaigns, permissions","required":false},{"schema":{"type":"integer"},"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}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Layout"}}}}}}}}}}
```

## Add a Layout

> Add a new Layout to the CMS

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout":{"post":{"tags":["layout"],"summary":"Add a Layout","description":"Add a new Layout to the CMS","operationId":"layoutAdd","responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The layout name"},"description":{"type":"string","description":"The layout description"},"layoutId":{"type":"integer","description":"If the Layout should be created with a Template, provide the ID, otherwise don't provide"},"resolutionId":{"type":"integer","description":"If a Template is not provided, provide the resolutionId for this Layout."},"returnDraft":{"type":"boolean","description":"Should we return the Draft Layout or the Published Layout on Success?"},"code":{"type":"string","description":"Code identifier for this Layout"},"folderId":{"type":"integer","description":"Folder ID to which this object should be assigned to"}},"required":[]}}}}}}}}
```

## Clear Layout

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

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"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":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID to Clear, must be a draft.","required":true}],"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}}}
```

## Edit Layout

> Edit a Layout

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout/{layoutId}":{"put":{"tags":["layout"],"summary":"Edit Layout","description":"Edit a Layout","operationId":"layoutEdit","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The Layout Name"},"description":{"type":"string","description":"The Layout Description"},"tags":{"type":"string","description":"A comma separated list of Tags"},"retired":{"type":"integer","description":"A flag indicating whether this Layout is retired."},"enableStat":{"type":"integer","description":"Flag indicating whether the Layout stat is enabled"},"code":{"type":"string","description":"Code identifier for this Layout"},"folderId":{"type":"integer","description":"Folder ID to which this object should be assigned to"}},"required":["name"]}}}}}}}}
```

## Delete Layout

> Delete a Layout

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}}},"paths":{"/layout/{layoutId}":{"delete":{"tags":["layout"],"summary":"Delete Layout","description":"Delete a Layout","operationId":"layoutDelete","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID to Delete","required":true}],"responses":{"204":{"description":"successful operation"}}}}}}
```

## Edit Layout Background

> Edit a Layout Background

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout/background/{layoutId}":{"put":{"tags":["layout"],"summary":"Edit Layout Background","description":"Edit a Layout Background","operationId":"layoutEditBackground","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"backgroundColor":{"type":"string","description":"A HEX color to use as the background color of this Layout."},"backgroundImageId":{"type":"integer","description":"A media ID to use as the background image for this Layout."},"backgroundzIndex":{"type":"integer","description":"The Layer Number to use for the background."},"resolutionId":{"type":"integer","description":"The Resolution ID to use on this Layout."}},"required":["backgroundColor","backgroundzIndex"]}}}}}}}}
```

## Apply Template

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

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}}},"paths":{"/layout/applyTemplate/{layoutId}":{"put":{"tags":["layout"],"summary":"Apply Template","description":"Apply a new Template to an existing Layout, replacing it.","operationId":"layoutApplyTemplate","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","required":true}],"responses":{"204":{"description":"successful operation"}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"templateId":{"type":"integer","description":"If the Layout should be created with a Template, provide the ID, otherwise don't provide"}},"required":[]}}}}}}}}
```

## Retire Layout

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

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}}},"paths":{"/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":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID","required":true}],"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.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}}},"paths":{"/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":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID","required":true}],"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.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}}},"paths":{"/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":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID","required":true}],"responses":{"204":{"description":"successful operation"}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"enableStat":{"type":"integer","description":"Flag indicating whether the Layout stat is enabled"}},"required":["enableStat"]}}}}}}}}
```

## Copy Layout

> Copy a Layout, providing a new name if applicable

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout/copy/{layoutId}":{"post":{"tags":["layout"],"summary":"Copy Layout","description":"Copy a Layout, providing a new name if applicable","operationId":"layoutCopy","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID to Copy","required":true}],"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name for the new Layout"},"description":{"type":"string","description":"The Description for the new Layout"},"copyMediaFiles":{"type":"integer","description":"Flag indicating whether to make new Copies of all Media Files assigned to the Layout being Copied"}},"required":["name","copyMediaFiles"]}}}}}}}}
```

## Tag Layout

> Tag a Layout with one or more tags

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout/{layoutId}/tag":{"post":{"tags":["layout"],"summary":"Tag Layout","description":"Tag a Layout with one or more tags","operationId":"layoutTag","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout Id to Tag","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"tag":{"type":"array","description":"An array of tags"}},"required":["tag"]}}}}}}}}
```

## Untag Layout

> Untag a Layout with one or more tags

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout/{layoutId}/untag":{"post":{"tags":["layout"],"summary":"Untag Layout","description":"Untag a Layout with one or more tags","operationId":"layoutUntag","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout Id to Untag","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"tag":{"type":"array","description":"An array of tags"}},"required":["tag"]}}}}}}}}
```

## Layout Status

> Calculate the Layout status and return a Layout

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout/status/{layoutId}":{"get":{"tags":["layout"],"summary":"Layout Status","description":"Calculate the Layout status and return a Layout","operationId":"layoutStatus","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout Id to get the status","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}}}
```

## Checkout Layout

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

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"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":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}}}
```

## Publish Layout

> Publish a Layout, discarding the original

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout/publish/{layoutId}":{"put":{"tags":["layout"],"summary":"Publish Layout","description":"Publish a Layout, discarding the original","operationId":"layoutPublish","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"publishNow":{"type":"integer","description":"Flag, indicating whether to publish layout now"},"publishDate":{"type":"string","description":"The date/time at which layout should be published"}},"required":[]}}}}}}}}
```

## Discard Layout

> Discard a Layout restoring the original

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/layout/discard/{layoutId}":{"put":{"tags":["layout"],"summary":"Discard Layout","description":"Discard a Layout restoring the original","operationId":"layoutDiscard","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}}}}}}
```

## Add a Full Screen Layout

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

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"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","responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"The Media or Playlist ID that should be added to this Layout"},"type":{"type":"string","description":"The type of Layout to be created = media or playlist"},"resolutionId":{"type":"integer","description":"The Id of the resolution for this Layout, defaults to 1080p for playlist and closest resolution match for Media"},"backgroundColor":{"type":"string","description":"A HEX color to use as the background color of this Layout. Default is black #000"},"layoutDuration":{"type":"boolean","description":"Use with media type, to specify the duration this Media should play in one loop"}},"required":["id","type"]}}}}}}}}
```

## Add Region

> Add a Region to a Layout

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/region/{id}":{"post":{"tags":["layout"],"summary":"Add Region","description":"Add a Region to a Layout","operationId":"regionAdd","parameters":[{"schema":{"type":"integer"},"name":"id","in":"path","description":"The Layout ID to add the Region to","required":true}],"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Region"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"The type of region this should be, zone, frame, playlist or canvas. Default = frame."},"width":{"type":"integer","description":"The Width, default 250"},"height":{"type":"integer","description":"The Height"},"top":{"type":"integer","description":"The Top Coordinate"},"left":{"type":"integer","description":"The Left Coordinate"}},"required":[]}}}}}}}}
```

## Edit Region

> Edit Region

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/region/{id}":{"put":{"tags":["layout"],"summary":"Edit Region","description":"Edit Region","operationId":"regionEdit","parameters":[{"schema":{"type":"integer"},"name":"id","in":"path","description":"The Region ID to Edit","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Region"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"width":{"type":"integer","description":"The Width, default 250"},"height":{"type":"integer","description":"The Height"},"top":{"type":"integer","description":"The Top Coordinate"},"left":{"type":"integer","description":"The Left Coordinate"},"zIndex":{"type":"integer","description":"The Layer for this Region"},"transitionType":{"type":"string","description":"The Transition Type. Must be a valid transition code as returned by /transition"},"transitionDuration":{"type":"integer","description":"The transition duration in milliseconds if required by the transition type"},"transitionDirection":{"type":"string","description":"The transition direction if required by the transition type."},"loop":{"type":"integer","description":"Flag indicating whether this region should loop if there is only 1 media item in the timeline"}},"required":["loop"]}}}}}}}}
```

## Region Delete

> Delete an existing region

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}}},"paths":{"/region/{regionId}":{"delete":{"tags":["layout"],"summary":"Region Delete","description":"Delete an existing region","operationId":"regionDelete","parameters":[{"schema":{"type":"integer"},"name":"regionId","in":"path","description":"The Region ID to Delete","required":true}],"responses":{"204":{"description":"successful operation"}}}}}}
```

## Position Regions

> Position all regions for a Layout

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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"}}},"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/region/position/all/{layoutId}":{"put":{"tags":["layout"],"summary":"Position Regions","description":"Position all regions for a Layout","operationId":"regionPositionAll","parameters":[{"schema":{"type":"integer"},"name":"layoutId","in":"path","description":"The Layout ID","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"regions":{"type":"array","description":"Array of regions and their new positions. Each array element should be json encoded and have regionId, top, left, width and height."}},"required":["regions"]}}}}}}}}
```

## Add drawer Region

> Add a drawer Region to a Layout

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/region/drawer/{id}":{"post":{"tags":["layout"],"summary":"Add drawer Region","description":"Add a drawer Region to a Layout","operationId":"regionDrawerAdd","parameters":[{"schema":{"type":"integer"},"name":"id","in":"path","description":"The Layout ID to add the Region to","required":true}],"responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Region"}}}}}}}}}
```

## Save Drawer

> Save Drawer

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"layout","description":"Layouts"}],"servers":[{"url":"/api"}],"security":[{"auth":["write:all","read:all"]}],"components":{"securitySchemes":{"auth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/api/authorize","tokenUrl":"/api/authorize/access_token","scopes":{"read:all":"read access","write:all":"write access"}}}}},"schemas":{"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":{"description":"This Regions Playlist - null if getPlaylist() has not been called.","$ref":"#/components/schemas/Playlist"}}},"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"}}},"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"}}},"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"}}},"TagLink":{"properties":{"tag":{"description":"The Tag","type":"string"},"tagId":{"description":"The Tag ID","type":"integer"},"value":{"description":"The Tag Value","type":"string"}}},"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"}}},"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"}}},"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"}}}}},"paths":{"/region/drawer/{id}":{"put":{"tags":["layout"],"summary":"Save Drawer","description":"Save Drawer","operationId":"regionDrawerSave","parameters":[{"schema":{"type":"integer"},"name":"id","in":"path","description":"The Drawer ID to Save","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Region"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"width":{"type":"integer","description":"The Width, default 250"},"height":{"type":"integer","description":"The Height"}},"required":[]}}}}}}}}
```


---

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