Assigning media to playlist using API no longer works on Xibo 3.0?

Hello,

I am trying to assign a media to a playlist automatically created inside of a layout.

Here is the request I’m sending
image

I have tried both with postman and the PHP oauth2 api.
The media id 25 does exist, aswell as the playlist id15.
And I am sure that everything else is correct since it was working on a Xibo 2.0.5 CMS and is still working for all the other requests, such as creating the layout.

Do you have any idea of what might cause this error ?
Thanks.

It’s not really in my wheelhouse, but the API docs say that the media parameter should be an integer array, and you’re passing in a single integer, so that’s likely the issue.

https://xibo.org.uk/manual/api/#/playlist/playlistLibraryAssign

I don’t believe that’s the problem.

I am passing the media as an array using the PHP oauth2 API and I still get the same error. I haven’t changed anything to my code since the version 2 and it was working back then.

I’ve had one of our dev team check and it works as expected for them using Postman as follows.

The media ID must be an integer array, and it shouldn’t be passed as a parameter but should be part of the body:

image

The input validation on version 2 is more forgiving and may validate your original request, but it’s not how it should be, and the validation on v3 is correct in rejecting that.

The Xibo Community site uses cookies. What are cookies?