Alert export API
With the Databand alert export API, you can query all alerts that were triggered within your Databand environment. With this API, you can perform analytics on the general health and frequency of incidents within your data platform by using the external tool of your choice.
API parameters
Table 1. Example of an endpoint to which a request is sent
Endpoint |
---|
https://your-Databand-hostname/api/external_metadata/v0/alerts |
Table 2. Method used to send the request
Method |
---|
GET |
Table 3. Query parameters with their descriptions and examples
All of the query parameters are optional.
Query parameters | Description | Example |
---|---|---|
triggered_on |
The time frame from which you want to extract alerts. It is defined by the time that alerts were triggered. Provide the starting and ending timestamps in the ISO format with the proper URL encoding. Separate them by "--". The delta between the starting and ending timestamps cannot exceed 30 days. |
triggered_on=2024-01-01T00%3A00%3A00.000000%2B00%3A00--2024-01-15T00%3A00%3A00.000000%2B00%3A00 |
updated_on |
The time frame from which you want to extract alerts. It is defined by the time that alerts were updated that is their status changed. For the alerts with no status changes, updated_on and triggered_on contain the same value. Provide the starting and ending timestamps in the ISO format with the proper URL encoding and separated by "--". The delta between the starting and ending timestamps cannot exceed 30 days. |
updated_on=2024-01-01T00%3A00%3A00.000000%2B00%3A00--2024-01-15T00%3A00%3A00.000000%2B00%3A00 |
limit |
The maximum number of alerts to extract. The default value is 100, and the maximum value is 10,000. | limit=1000 |
offset |
If specified, only alerts with an alert ID greater than the provided offset are returned. | offset=20500 |
When a value is specified for the offset
parameter, the results are sorted in an ascending order based on the time that they were last updated. Otherwise, the results are sorted in a descending order based on the time of the last
update.
Table 4. Headers
Headers |
---|
Authorization : "Bearer <your Databand access token>" |
Table 5. Example URL
Example URL |
---|
https://databand.ai/api/external_metadata/v0/alerts?updated_on=2024-01-01T00%3A00%3A00.000000%2B00%3A00--2024-01-15T00%3A00%3A00.000000%2B00%3A00&limit=750&offset=20000 |
Results schema
Table 6. Query results and their description
Field | Type | Description |
---|---|---|
databand_link |
string | The URL to the alert details page in the Databand UI |
id |
integer | The unique ID for the alert |
name |
string | The name of the alert as defined in the Databand UI |
severity |
string | The alert severity as defined in the Databand UI (Critical, High, Medium, or Low) |
status |
string | The alert state in the Databand UI (Triggered, Acknowledged, or Resolved) |
trigger_value |
string | The value that triggered the alert |
triggered_on |
datetime | The time that the alert was originally triggered |
acknowledged_on |
datetime | The time that the alert was acknowledged |
resolved_on |
datetime | The time that the alert was resolved |
updated_on |
datetime | The time of the alert's most recent status update. If no updates were made, it is the time that the alert was triggered. |
type |
string | The alert type |
source |
string | The data source integration that the alerted asset belongs to (where applicable) |
project |
string | The project that the alerted asset belongs to (where applicable) |
pipeline |
string | The pipeline from which the alert originated (where applicable) |
run |
string | The run name from which the alert originated (where applicable) |
task |
string | The task name from which the alert originated (where applicable) |
metric |
string | The metric name for which the alert is defined (where applicable) |
datasets |
array of strings | Datasets associated with the alert (where applicable) |
columns |
array of strings | Column names associated with the alert (where applicable) |
Assets in Databand generally fall into a hierarchy that starts at the source level and goes down to the column level. However, some alert types are associated with certain parts of this hierarchy only. For example, an alert for a pipeline failure
doesn't have any associated datasets or columns, and a table data quality alert is not associated with any pipeline components. If an alert does not apply to a field within the asset hierarchy, the field returns a null
value.
Example results
[
{
"acknowledge_on": null,
"columns": [],
"databand_link": "https://databand-internal-sa.databand.ai/app/alerts/122742/overview?utm_source=external_metadata_api",
"datasets": [
"ADLS - Service 311 Filtered"
],
"id": 122742,
"metric": null,
"name": "SLA alert on dataset uid: a1b5748e-c405-11ee-aaa2-c29c05df32b5.",
"pipeline": null,
"project": null,
"resolved_on": null,
"run": null,
"severity": "LOW",
"source": null,
"status": "TRIGGERED",
"task": null,
"trigger_value": "Data not updated in last hour, Last update 24-02-29 17:00:20 +0000",
"triggered_on": "2024-02-29T18:00:56.680192+00:00",
"type": "DatasetSlaAlert",
"updated_on": "2024-02-29T18:00:56.680192+00:00"
},
{
"acknowledge_on": null,
"columns": [],
"databand_link": "https://databand-internal-sa.databand.ai/app/alerts/122740/overview?utm_source=external_metadata_api",
"datasets": [
"SERVICE_311.DATABAND_INTERNAL_SA_DEMO_AF.CLOSED_REQUESTS"
],
"id": 122740,
"metric": "Missing data operations",
"name": "Missing data operation: service_311_closed_requests",
"pipeline": "service_311_closed_requests",
"project": "Service 311",
"resolved_on": null,
"run": "scheduled__2024-02-29T17:00:00+00:00",
"severity": "HIGH",
"source": "databand-internal-sa-demo-af",
"status": "TRIGGERED",
"task": null,
"trigger_value": "1 missing operations",
"triggered_on": "2024-02-29T18:00:56.093582+00:00",
"type": "RunMissingOperationAlert",
"updated_on": "2024-02-29T18:00:56.093582+00:00"
},
{
"acknowledge_on": null,
"columns": [],
"databand_link": "https://databand-internal-sa.databand.ai/app/alerts/122735/overview?utm_source=external_metadata_api",
"datasets": [
"S3 - Asia Raw Daily Sales Extract",
"S3 - Europe Raw Daily Sales Extract",
"S3 - North America Raw Daily Sales Extract"
],
"id": 122735,
"metric": "Run State",
"name": "Run failed: Global Sales DAG",
"pipeline": "daily_sales_ingestion",
"project": "Global Sales",
"resolved_on": null,
"run": "scheduled__2024-02-29T12:00:00+00:00",
"severity": "CRITICAL",
"source": "databand-internal-sa-demo-af",
"status": "TRIGGERED",
"task": null,
"trigger_value": "failed",
"triggered_on": "2024-02-29T18:00:53.480915+00:00",
"type": "RunStateAlert",
"updated_on": "2024-02-29T18:00:53.480915+00:00"
}
]