Retrieving incidents by variable

Dear Camunda experts,

We are building a SAAS application with multiple tenants and workflows. We need to list out the running, finished and failed processes of our users. The problem is that if a process definition contains a definition error, the process instance won’t be created, only an incident. The incident endpoint cannot be filtered by variables (userId or TenantId for example). Also it does not return which task having the error, only the error message. What would be a best approach to retrieve the failed processes for a given user or tenant using the API with detailed information, like the exact place of the error? We are using Camunda 7, could it be solve our problem if we upgrade to Camunda 8?

Thanks in advance,
Csaba

Hi,
Get Incidents | docs.camunda.org has tenantIdIn parameter, so I’m not sure what exactly is the issue. Is this not set on your incidents?

We are injecting our own variables into process definitions, like workspace id and our tenant id. We would like to filter on them. Also we need to show our users which task fails.

If it’s possible for you to extend the engine in your application, maybe you could look into extending the REST API and writing your own queries for that.
Some idea how to achieve that can be found in these posts:

Thank you Eileen. We will consider this option.