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 an integration
  3. Select APIContext (APImetrics) and click Save
  4. Open the new 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 Routes after creation
  4. Click Save and copy the generated push URL

Configure APIContext


1

Add a Generic webhook

  1. Sign in to APIContext (client.apimetrics.io) and open the project you want to monitor
  2. In the left navigation, select Alerts & Webhooks and click + Add new action
  3. Set Type to Generic and enter a name, for example Flashduty
  4. Paste the full Flashduty push URL (including integration_key) into URL
  5. Set Authentication to None; no custom HTTP header is needed
2

Choose the result types to send

Under Trigger alerts, turn on Fail, Warning, Slow and Pass. Pass is required: without it Flashduty receives no recovery notification and alerts never close automatically.Set Only alert after this many failures in a row to 1 to alert on the first failure; 0 sends every result. Use Include tags and Exclude tags to limit which API calls send notifications.
With Pass on, every successful call sends a request to Flashduty. A PASS with no matching active alert creates nothing; 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 fail (for example, point the call at an address that returns 5xx) and confirm that Flashduty receives an active alert
  3. Restore the API and confirm that the alert closes when 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.