API 2.0 Get schedule datas gives an array of null

Hi,

I’m trying to call the /api/schedule/data/events with the oauth2 API
https://github.com/xibosignage/oauth2-xibo-cms/blob/8e6ddb4be070257233c225f8829b8117f9d978c3/src/Entity/XiboSchedule.php#L91. I have some layouts scheduled on the displayGroupId 6 and here is what the result looks like :


The call is working within postman but using the PHP it just gives me an array with null datas.

Do you know why ?

I call it with the ID 6 which is the ID of my display group : $schedule = (new \Xibo\OAuth2\Client\Entity\XiboSchedule($entityProvider))->get(array(‘displayGroupIds’=>array(6)));

Hi,

Still no ideas ?

I don’t really understand why they would be empty - although if you’re sending those in a URL don’t they have to be displayGroupIds[] ?

All I can suggest is to add some logging in XiboSchedule.php to see if you can see why.

Hey, I tried debugging a bit the XiboSchedule.php, still can’t figure out how to get results…

Finally I was able to get something from this function : https://github.com/xibosignage/oauth2-xibo-cms/blob/8e6ddb4be070257233c225f8829b8117f9d978c3/src/Entity/XiboSchedule.php#L110
The problem was the hydrate function, when I do “return $repsonse”, yes the array is not the same, but datas are here

But is there a way to have the list of scheduled layouts during all day ? Because now I have two layouts scheduled as “always”, and 3 are “custom”, for example “08:50:00 to 08:55:00” and “18:30:00 to 18:35:00”. the problem is if I want to get one of them I need to type a date-time between the fromDt and toDt, and sometimes I don’t know it exactly…

I’ve tried to do it with schedule/data/events : http://localhost:5859/api/schedule/data/events?access_token=MY_ACCESS_TOKEN&displayGroupIds=4&from=0&to=2100191200
I did it with GET and POST but neither worked. They just return me success:1 and resulst:[]