Skip to main content
Use the APIContext (formerly APImetrics) Performance Results Webhook to send API monitoring results to Flashduty On-call. A result whose result_class is FAIL, WARNING or SLOW triggers or updates a Flashduty alert; a PASS result for the same call from any location closes that alert.

In Flashduty On-call

You can get the integration push URL in either of the following ways.

Use a dedicated integration

  1. In the Flashduty console, go to Channels and open a channel
  2. Select Configuration → Integrations → Private integration, then click Add integration
  3. Select APIContext (APImetrics) and click Save
  4. Open the generated integration card and copy the Push URL

Use a shared integration

  1. In the Flashduty console, go to Integration Center → Alert Events
  2. Select APIContext (APImetrics) and enter an integration name
  3. Configure the default route and select a channel. You can add more rules under Routing after creation
  4. Click Save and copy the generated Push URL

Configure APIContext

1

Add a Generic webhook in APIContext

Where: APIContext (client.apimetrics.io) › your project › Alerts & Webhooks › + Add new action
2

Choose the result types to send

Where: APIContext › your project › Alerts & Webhooks › + Add new action › Trigger alerts
With Pass selected, every successful call sends a request to Flashduty. A PASS with no matching active alert creates no new alert; it only closes the active alert of the same call.
3

Enable and verify

  1. Turn on the Enabled toggle on the right and click Save
  2. Make a monitored API actually fail (for example, point the call at an address that returns 5xx), confirm Flashduty receives an active alert, and the integration shows Latest event time
  3. Restore the API and confirm the original alert closes once the next PASS result arrives

Payload

APIContext sends JSON with an HTTP POST, one request per call result; no template is needed. Flashduty uses these fields: The alert title is “call name: result”, for example Orders API: HTTP_SERVER_ERROR.

Alert key

The Alert Key is computed from call_id, so each API call has one alert. The APIContext documentation describes call_id as a static ID that is the same every time the call is made, so the failure and the recovery of one call land on the same alert, whichever probe location reports them. With the default schedule each run executes from one random location, so a PASS from any location closes the call’s alert and the next failure reopens it. location_id is kept as a label and in the description. Changing the call name, result detail, response time or HTTP status code does not change the Alert Key. When a request has no call_id, Flashduty returns a parameter error because it cannot reliably match a recovery to its alert. A request with no call_id, result_id and result_class (such as an empty object) is treated as a test request: it returns success and creates no alert.

Status and severity

SLOW means the call succeeded but responded slowly. Flashduty records it as Warning and does not close an existing failure alert. To change a severity, rewrite it with a rule under the channel’s Configuration.

FAQ

Check that the APIContext webhook has Pass turned on. APIContext sends the PASS result to the webhook, and Flashduty closes the alert with the same call_id, whatever the location. If the alert stays open, check that the call’s PASS results are actually sent.
One. Alerts are grouped per call: failures from every location merge into the same alert, and a PASS from any location closes it. If a call fails in only some locations, a success from another location closes the alert and the next failure reopens it, so it may open and close repeatedly. As an optional fallback, turn on the auto-close timeout for the channel with the timing start set to Incident trigger; you can also pin Node Locations in the APIContext Schedules so a call always runs from the same places.
No. The Alert Key of a call does not change, so repeated failure results merge into the same alert.

Troubleshooting

  • APIContext does not receive a success response: confirm the URL is the full push URL and includes integration_key
  • Flashduty returns a parameter error: the request body has no call_id. Confirm that you use the Generic webhook rather than an OpenTelemetry or other export type
  • No alerts arrive: check the webhook’s Enabled toggle, its Snooze state, and the Allow toggle under Downtimes in the organization settings
For field details, see the APIContext documentation: Performance Results Webhook and Generic Webhook.