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

# Playlist

Playlists

## Search Playlists

> Search for Playlists viewable by this user

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"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"}}},"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"}}}}},"paths":{"/playlist":{"get":{"tags":["playlist"],"summary":"Search Playlists","description":"Search for Playlists viewable by this user","operationId":"playlistSearch","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"query","description":"Filter by Playlist Id","required":false},{"schema":{"type":"string"},"name":"name","in":"query","description":"Filter by partial Playlist name","required":false},{"schema":{"type":"integer"},"name":"userId","in":"query","description":"Filter by user Id","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":"string"},"name":"embed","in":"query","description":"Embed related data such as regions, widgets, permissions, tags","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/Playlist"}}}}}}}}}}
```

## Add a Playlist

> Add a new Playlist

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"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"}}},"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"}}}}},"paths":{"/playlist":{"post":{"tags":["playlist"],"summary":"Add a Playlist","description":"Add a new Playlist","operationId":"playlistAdd","responses":{"201":{"description":"successful operation","headers":{"Location":{"description":"Location of the new record","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Playlist"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The Name for this Playlist"},"tags":{"type":"string","description":"Tags"},"isDynamic":{"type":"integer","description":"Is this Playlist Dynamic?"},"filterMediaName":{"type":"string","description":"Add Library Media matching the name filter provided"},"logicalOperatorName":{"type":"string","description":"When filtering by multiple names in name filter, which logical operator should be used? AND|OR"},"filterMediaTag":{"type":"string","description":"Add Library Media matching the tag filter provided"},"exactTags":{"type":"integer","description":"When filtering by Tags, should we use exact match?"},"logicalOperator":{"type":"string","description":"When filtering by Tags, which logical operator should be used? AND|OR"},"maxNumberOfItems":{"type":"integer","description":"Maximum number of items that can be assigned to this Playlist (dynamic Playlist only)"},"folderId":{"type":"integer","description":"Folder ID to which this object should be assigned to"}},"required":["name","isDynamic"]}}}}}}}}
```

## Edit a Playlist

> Edit a Playlist

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"/playlist/{playlistId}":{"put":{"tags":["playlist"],"summary":"Edit a Playlist","description":"Edit a Playlist","operationId":"playlistEdit","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The PlaylistId to Edit","required":true}],"responses":{"204":{"description":"successful operation"}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The Name for this Playlist"},"tags":{"type":"string","description":"Tags"},"isDynamic":{"type":"integer","description":"Is this Playlist Dynamic?"},"filterMediaName":{"type":"string","description":"Add Library Media matching the name filter provided"},"logicalOperatorName":{"type":"string","description":"When filtering by multiple names in name filter, which logical operator should be used? AND|OR"},"filterMediaTag":{"type":"string","description":"Add Library Media matching the tag filter provided"},"exactTags":{"type":"integer","description":"When filtering by Tags, should we use exact match?"},"logicalOperator":{"type":"string","description":"When filtering by Tags, which logical operator should be used? AND|OR"},"maxNumberOfItems":{"type":"integer","description":"Maximum number of items that can be assigned to this Playlist (dynamic Playlist only)"},"folderId":{"type":"integer","description":"Folder ID to which this object should be assigned to"}},"required":["name","isDynamic"]}}}}}}}}
```

## Delete a Playlist

> Delete a Playlist

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"/playlist/{playlistId}":{"delete":{"tags":["playlist"],"summary":"Delete a Playlist","description":"Delete a Playlist","operationId":"playlistDelete","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The PlaylistId to delete","required":true}],"responses":{"204":{"description":"successful operation"}}}}}}
```

## Copy Playlist

> Copy a Playlist, providing a new name if applicable

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"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"}}},"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"}}}}},"paths":{"/playlist/copy/{playlistId}":{"post":{"tags":["playlist"],"summary":"Copy Playlist","description":"Copy a Playlist, providing a new name if applicable","operationId":"playlistCopy","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The Playlist 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/Playlist"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name for the new Playlist"},"copyMediaFiles":{"type":"integer","description":"Flag indicating whether to make new Copies of all Media Files assigned to the Playlist being Copied"}},"required":["name","copyMediaFiles"]}}}}}}}}
```

## Assign Library Items

> Assign Media from the Library to this Playlist

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"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"}}},"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"}}}}},"paths":{"/playlist/library/assign/{playlistId}":{"post":{"tags":["playlist"],"summary":"Assign Library Items","description":"Assign Media from the Library to this Playlist","operationId":"playlistLibraryAssign","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The Playlist ID to assign to","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Playlist"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"media":{"type":"array","description":"Array of Media IDs to assign"},"duration":{"type":"integer","description":"Optional duration for all Media in this assignment to use on the Widget"},"useDuration":{"type":"integer","description":"Optional flag indicating whether to enable the useDuration field"},"displayOrder":{"type":"integer","description":"Optional integer to say which position this assignment should occupy in the list. If more than one media item is being added, this will be the position of the first one."}},"required":["media"]}}}}}}}}
```

## Order Widgets

> Set the order of widgets in the Playlist

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"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"}}},"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"}}}}},"paths":{"/playlist/order/{playlistId}":{"post":{"tags":["playlist"],"summary":"Order Widgets","description":"Set the order of widgets in the Playlist","operationId":"playlistOrder","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The Playlist ID to Order","required":true}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Playlist"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"widgets":{"type":"array","description":"Array of widgetIds and positions - all widgetIds present in the playlist need to be passed in the call with their positions"}},"required":["widgets"]}}}}}}}}
```

## Get Playlist Item Usage Report

> Get the records for the playlist item usage report

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"/playlist/usage/{playlistId}":{"get":{"tags":["playlist"],"summary":"Get Playlist Item Usage Report","description":"Get the records for the playlist item usage report","operationId":"playlistUsageReport","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The Playlist Id","required":true}],"responses":{"200":{"description":"successful operation"}}}}}}
```

## Get Playlist Item Usage Report for Layouts

> Get the records for the playlist item usage report for Layouts

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"/playlist/usage/layouts/{playlistId}":{"get":{"tags":["playlist"],"summary":"Get Playlist Item Usage Report for Layouts","description":"Get the records for the playlist item usage report for Layouts","operationId":"playlistUsageLayoutsReport","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The Playlist Id","required":true}],"responses":{"200":{"description":"successful operation"}}}}}}
```

## Enable Stats Collection

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

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"/playlist/setenablestat/{playlistId}":{"put":{"tags":["playlist"],"summary":"Enable Stats Collection","description":"Set Enable Stats Collection? to use for the collection of Proof of Play statistics for a Playlist.","operationId":"playlistSetEnableStat","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The Playlist ID","required":true}],"responses":{"204":{"description":"successful operation"}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"enableStat":{"type":"string","description":"The option to enable the collection of Media Proof of Play statistics, On, Off or Inherit."}},"required":["enableStat"]}}}}}}}}
```

## Playlist Select folder

> Select Folder for Playlist

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"/playlist/{id}/selectfolder":{"put":{"tags":["playlist"],"summary":"Playlist Select folder","description":"Select Folder for Playlist","operationId":"playlistSelectFolder","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The Playlist ID","required":true}],"responses":{"204":{"description":"successful operation"}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"folderId":{"type":"integer","description":"Folder ID to which this object should be assigned to"}},"required":[]}}}}}}}}
```

## Playlist Convert

> Create a global playlist from inline editor Playlist.> \
> &#x20;    \* Assign created Playlist via sub-playlist Widget to region Playlist.

```json
{"openapi":"3.1.1","info":{"title":"Xibo API","version":"4.0"},"tags":[{"name":"playlist","description":"Playlists"}],"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":{"/playlist/{id}/convert":{"post":{"tags":["playlist"],"summary":"Playlist Convert","description":"Create a global playlist from inline editor Playlist.\r\n     * Assign created Playlist via sub-playlist Widget to region Playlist.","operationId":"convert","parameters":[{"schema":{"type":"integer"},"name":"playlistId","in":"path","description":"The Playlist ID","required":true}],"responses":{"201":{"description":"successful operation"}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Optional name for the global Playlist."}},"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/playlist.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.
