SolvedAPI & Developers
How do I filter incidents by more than one status?
Asked by Isabelle Laurent24 days ago
I want to build an internal dashboard showing only incidents that are still live, meaning open, acknowledged or investigating. Filtering by a single status works but I cannot figure out how to pass several at once without making three separate calls.
Accepted answer from MonoDuty Support
45
Selin YıldızMonoDuty Support Engineer23 days ago
Hi Isabelle, the status filter accepts a comma separated list, so one call is enough. Pass the three values separated by commas and you get the union.
While you are building that dashboard, the other filters available on the incident list are worth knowing:
Severity, as a single value. Source type and source id, which lets you show incidents coming from one particular monitor or heartbeat. Assignee type together with assignee id, to build a mine view. And created after and created before for time windows.
Sorting is restricted to a fixed set of fields: created at, severity, status and updated at, with a direction of ascending or descending. Anything outside that set is ignored rather than rejected, which can be confusing when a typo silently gives you default ordering.
For a live dashboard I would combine the status filter with descending order on created at and a page size of 100.
Was this helpful?45 of 47 found this helpful
2 replies
Isabelle Laurent22 days ago
Comma separated worked. Also good to know unknown sort fields fail silently, that would have confused me.
Selin YıldızMonoDuty Support Engineer22 days ago
Glad it helped. One more tip for a live view: incidents that were soft deleted do not appear in the normal list at all, they have their own separate listing. So if a record seems to vanish from your dashboard rather than changing status, that is usually where it went.