Docs / API: Alert rules
List deliveries
Returns the delivery log of one rule, newest first. Log rows are kept for 14 days.
GET/api/v1/rules/{id}/deliveries
| Property | Value |
|---|---|
| Authentication | Required. Send Authorization: Bearer <key>. |
| Rate-limit cost | 1 unit |
| Status | Live |
#Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Rule id. |
limit | query | integer | No | From 1 to 100. Default 25. |
#Request
curl -s "https://farbeamlabs.com/api/v1/rules/<id>/deliveries" \
-H "Authorization: Bearer $FARBEAM_KEY"const res = await fetch("https://farbeamlabs.com/api/v1/rules/<id>/deliveries", {
headers: { Authorization: `Bearer ${process.env.FARBEAM_KEY}` }
});
const { data, meta, error } = await res.json();
if (error) throw new Error(`${error.code}: ${error.message}`);
console.log(data);import os, requests
res = requests.get(
"https://farbeamlabs.com/api/v1/rules/<id>/deliveries",
headers={"Authorization": f"Bearer {os.environ['FARBEAM_KEY']}"},
timeout=30,
)
body = res.json()
if "error" in body:
raise RuntimeError(body["error"]["code"])
print(body["data"])You can send this request now in the API playground.
#Errors
| HTTP | Code | Meaning |
|---|---|---|
| 401 | missing_key | The request has no key. |
| 404 | not_found | The item does not exist. |
All errors share one format. See errors.