Every time you Checkout/Publish a Layout the LayoutId as well as regionPlaylist playlistId and widgetIds will change.
in 2.1 when you create a new layout it is in Published status, when you call Checkout on this Layout ID, in response you will get a new layoutId which is the id of the draft layout that you can edit - ie you should use this new layoutId from checkout response to make changes to the Layout.
Now, regarding library/assign call, it is not called on Layout ID, it’s called on Playlist ID.
Each Layout has at least one region, each region has one regionPlaylist with playlistId.
When you call checkout, in response you will also get regions array, that will have regionPlaylist and inside of that you will see playlistId - that’s the Playlist ID specific to this specific region and that’s the id you should use in the playlist/library/assign/{playlistId}
API call.
If you have a Layout in a draft state, then you can get the Layout Id to edit by calling GET Layout API call with parentId
parameter set to the layoutId you can see in Layouts Grid.
You can filter GET Layout, by layout name as well, if you don’t know the ids and pass showDrafts
parameter to make it show you the editable layout as well ie say
{{url}}/api/layout?showDrafts=1&layout=faiz&embed=regions,playlists,widgets
The embed parameter is not necessary, however with it passed it will show you more details ie in this case regions, playlists and widgets will be expanded in the API response.
Regarding Publish/Checkout publishedStatus, indeed the string there does not change correctly in the response, we will get that fixed.
The publishedStatusId is changing correctly and that’s what you can look at 1 - Published, 2 - Draft.
apart from publishedStatusId, the layout that can be edited will also have a parentId, as mentioned earlier.
As a side note, you seem to have /web
in your CMS address, that should be addressed before anything else please - https://xibo.org.uk/docs/setup/prepare-your-environment
I hope that helps.