Stats Endpoint error

I am trying to hit the Stats endpoint and getting an error returned:
“Unexpected Error, please contact support.”

Log shows: “Each element of the ‘pipeline’ array must be an object Exception Type: MongoDB\Driver\Exception\CommandException”


@ifarzana any ideas?

Well I tried again today with fresh eyes. I tried using the path to pass the params instead of the body…

I don’t get an error but I also don’t get any kind of response… not sure if it’s progress or not…

Sorry…
another item on the same topic of Stats, I am hitting the setenablestats for Layouts, Media and Playlists.
They work to turn OFF but even though I get “success” status codes it doesn’t seem to change the stat enabled field. not sure if maybe I am missing something else…
Layouts I am using 1 and 0
Media and Playlists I am using On and Off

Hello,

The query parameters should be in the Params tab, not in the Body for this GET request. If you want to get stats of a specific type then you send the type parameter otherwise you don’t send it.

As for the /library/setenablestat/{mediaId} API, it requires url-encoded data. We have tested the endpoint and all seems to work, here is a screenshot of what it should look like.

2 Likes

Thank you @ifarzana!!
Seems I didn’t try leaving off the Type=All option… I got that working!
I also didn’t try URLEncoded… I was trying as form data from the Swagger UI it looked like it wanted that.

All is working now! Huzzah!

hii team i want use mongodb and mysql both in xibo3, is it possible? if yes please share demo code. thnak you