Schedule a layout now with API



I try to use API to schedule a layout NOW.

I use your example oauth2-xibo-cms ( and call the function \Xibo\OAuth2\Client\Entity\XiboSchedule($entityProvider))->createEventLayout($fromDt, $toDt, $campaignId, $displayGroupsIds, $dayPartId, $recurrenceType, $recurrenceDetail, $recurrenceRange, $displayOrder, $isPriority) ;

It works well, but I must to wait about a minute to see the result on the player. When I do it directly in the CMS, it’s instantaneous.

Is it the right function or there is another way to schedule something NOW ?

Thank you.

CMS version : 1.8.12
Player version : 1.8.108


Little up!

Is it possible to schedule a layout on a display NOW with API?


Currently there is no route to call schedule now via api.

The add schedule api call (or the wrapper that you’re using), create a new event on the Schedule page, ie the same result as if you’d create an event on the Schedule page in web ui - technically you can achieve the same result with that call by specifying the fromDt to be before current time.

Alternatively, you could take a look at the changeLayout API call
This is designed as an instant layout change - it does require working XMR to push the action to the player.


Hello Peter!
Thank’s for your answer!

I tried to call changeLayout, but I don’t have any result, there is no error, but nothing changed. However, I used the same ids that in my call to add a schedule which is right. I don’t know wath is wrong.



I tried to call changeLayout via Postman and apply the parameters in swagger.json.

But nothing changed, neither in the cms nor on the player. In Postman, in the answer, the “data” is empty, is it right?

How can I debug that?

Thank you.


The response looks fine.

Things to check
display is a member of Devices 2 display group as I assume that’s called on the actual display group.
XMR is definitely correctly configured and working - otherwise actions like changeLayout will not be sent to the player.
Would be good to also ensure that the date/time setting in CMS/server/player are all correct.


Thank’s for your answer.

I will control the dates, perhaps my local server isn’t right.

But otherwise, how can I control if XMR is working correctly?
The XMR address is tcp:// and the player is on the local network. But I don’t know how to check if working or not.

And is there a difference between a single display or un display group? I use the displayGroupId that the call GET /display returns, but I also try witht the displayGroupId which corresponds to the group in which there is my display (is my sentence clear?). None has any effect.

Thank you for your help.


Hi Peter,

Finally, I managed to make “changeLayout” work.

The date format of my display wasn’t in 24h. So, I put it on 24h format and it’s work.

Thank you for your help!