(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.