List alert deliveries
const url = 'https://api.us.headerhawk.com/v1/alert-deliveries?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.us.headerhawk.com/v1/alert-deliveries?limit=50' \ --header 'Authorization: Bearer <token>'Every alert HeaderHawk sent, tried to send or dropped, newest first, one entry per destination. A destination is named by its id, name and type, never its address.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only deliveries about this site, digests that covered it included.
A site your tenant does not have is 404.
Only deliveries to this destination, by the id a delivery names it with.
Only alerts of this type, such as csp.new_issue.
How many items a page holds.
The previous page’s nextCursor. Omit it for the first page.
Responses
Section titled “Responses”A page of deliveries
object
object
Shared by every destination one alert went to.
An open enum.
delivered, rejected (it errored or was refused; detail says
why), or dropped (there was nothing to send it to). An open
enum.
Why it was rejected or dropped, such as Webhook failed: 404.
Every URL, token, host name and address in it is replaced, so it
says what kind of failure it was and never where the destination
is.
object
Its name when it was sent; null when the destination was
deleted before it could be, which is recorded as dropped.
email, webhook or slack; null with name.
The sites a digest covered.
The alert’s one-line summary; null for a test, a digest, and alerts from before summaries were recorded.
Example
{ "data": [ { "kind": "immediate", "outcome": "delivered" } ]}Headers
Section titled “Headers”The budget nearest to running out, per minute.
What is left of that budget this minute.
Seconds until that budget starts again.
A parameter was refused, or one the operation does not take was sent. The message names it.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}invalid_api_key: no key, or one that is malformed, unknown, revoked
or expired. One answer for all of them.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}plan_upgrade_required: the tenant’s plan does not include API access
(the key works again when it does), or does not include what this
operation reads.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}No such resource in your tenant.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}rate_limited: over a budget. Wait Retry-After seconds.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}Headers
Section titled “Headers”Seconds to wait before trying again.