Order entry/search using REST API

Hello All

I am looking for the way to search for past and future scheduled drug orders using REST API While there is many useful samples how to do it with java, it’s still requires documenting as per comments for the original wiki post :

https://wiki.openmrs.org/display/docs/Order+Entry+API

In concrete terms, while there is the very easy way to retrieve all active orders using

/openmrs/ws/rest/v1/order?patient=efaab948-b3fa-4553-9c84-81594c91617e

I can not figure out how to search for orders with asOf date in the past or in the future. Maybe it can be achieved via order search or am i supposed to retrieve all encounters and go trough the graph looking for dates and doing manual filtering?

Thank you in advance.

@abtimo did you get a chance to look at these tests?