Error when trying to use the API's library upload call

Hello :slight_smile:

I’m using the trial version of Xibo CMS and I’m trying to get used with the api.

I’m following that tutorial to learn the basics Getting Started with Postman | Xibo Digital Signage

When I try use /api/playlist/library/assign/:playlistId I get the error : “This Layout is not a Draft, please checkout.”

But when I try to checkout with /api/layout/checkout/:layoutId I get : “Layout is already checked out”

In the CMS my Layout is in draft mode. What can I do ? I did not find solution to fix this.

Ok, I found out with the help of this post:
REST API does not retrieve correct IDs of widgets

I’ve been deceived by the fact that when we create a layout with the api, it’s automatically in draft mode and the response say that the parentId is null, so I assumed that the ID was the one of the draft layout, but it was the parent Id, so i had to make a get request /layout?parentId=53 to get the real draft layout’s id.

parentIdPNG

It seems to be a bug, it not makes things very convenient, but at least there is a way to get the right id.