REST-API query array with PHP

We are using the REST-API with PHP and we have an issue with the query parameter.

We got “Bad Request” and don’t know how to define the correct array
The example with python will give the correct results.

Maybe someone has a functional code snippet for us?

(Still a newbie at this, but I seem to have got further than you)

The documentation for your local installation is available via links from the CMK dashboard under help → APIs

I’m currently struggling with using the query syntax - but it seems to just ignore what I specify there (REST API downtime - query not behaving as expected) rather than returning a bad request which makes me think the issue lies elsewhere in your code. It should be trivial to test this by omitting the parameter. I suspect the issue might be with the additional headers you need to send (i.e. the authentication and accept headers) but we can’t see those in your code.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.