How to query Operate API Date period

Hello,

How to query Operate API to get instances started between two dates ex: 01-01-2023T11:00:00 and 03-02-2023:12:00:00,

but the operate interface query (captured from the network panel) with the below request

POST http://operate-url.com/api/process-instances

{
  "query": {
    "active": true,
    "running": true,
    "incidents": true,
    "tenantId": "<default>",
    "startDateAfter": "2023-11-18T00:00:00.000+0200",
    "startDateBefore": "2023-11-20T23:59:59.000+0200"
  },
  "sorting": {
    "sortBy": "startDate",
    "sortOrder": "desc"
  },
  "pageSize": 50
}

and the keys “startDateAfter” and “startDateBefore” are not exist in the documentation, and the only way is to use day, month, years, etc… intervals

Is there any workaround to achieve this?

Hi @mahmoud_helal - the /api route is an internal API. While it’s possible to reverse engineer the calls, as you’ve done, we do not support doing so: Camunda makes no guarantees about the compatibility of that API in future releases. The /v1 route is the supported API.

The only way to filter by dates that I’m aware of is what you already shared. I do like the idea of supporting a date range, so I have sent this feedback along to the product team!