Docs
API
Managing Alerts

Managing Alerts

Alerts define an alert threshold for a given saved search or saved chart, and will notify the specified channel when the threshold is breached. Specific alert channels (ex. Slack) may need to be authorized and set up in the UI separately before they can be used in an alert.

List Alerts

Lists alerts from the current team.

Request

GET /api/v1/alerts

This request takes no parameters.

Request Example

curl --request GET \
  --url https://api.hyperdx.io/api/v1/alerts \
  --header 'Authorization: Bearer YOUR_PERSONAL_API_KEY'

Response

data - (Object[]) A list of alert objects.

data.id - (String) Unique ID of the alert.

data.interval - (String) Checking interval of the alert, valid values are: 1m, 5m, 15m, 30m, 1h, 6h, 12h, 1d.

data.threshold - (Number) Threshold value of the alert.

data.threshold_type - (above | below) Threshold type of the alert, whether to alert either when the value is above or below the threshold.

data.source - (chart | search) Source of the alert, whether it's from a chart or a saved search.

data.dashboardId - (String) If a chart alert, the ID of the dashboard that the alert is associated with.

data.chartId - (String) If a chart alert, the ID of the chart that the alert is associated with.

data.savedSearchId - (String) If a search alert, the ID of the saved search that the alert is associated with.

data.groupBy - (String) If a search alert, the field or property the count of the search is grouped by.

data.name - (String | null) A custom name assigned to the alert.

data.message - (String | null) A custom message to send with any fired alert.

data.channel - (Object) The alert channel to notify when the threshold is breached.

data.channel.type - (email | slack | pagerduty | opsgenie | slack_webhook) The type of channel to alert.

data.channel.recipients - (String[]) If an email alert, the email addresses to notify.

data.channel.channelId - (String) If a slack alert, the ID of the slack channel to notify.

data.channel.severity - (String) If a Pagerduty alert, the severity to set the alert to (one of critical, error, warning, or info).

data.channel.webhookId - (String) If an Opsgenie alert, the HyperDX Webhook ID associated with the Opsgenie integration.

data.channel.priority - (String) If an Opsgenie alert, the priority of the alert from P0 to P5.

data.channel.webhookId - (String) If an Slack Webhook alert, the HyperDX Webhook ID associated with the Slack webhook.

Get Alert

Get a specific alert.

Request

GET /api/v1/alerts/{id}

This request takes no parameters.

Request Example

curl --request GET \
  --url https://api.hyperdx.io/api/v1/alerts/YOUR_ALERT_ID \
  --header 'Authorization: Bearer YOUR_PERSONAL_API_KEY'

Response

data - (Object) An object representing a specific alert.

data.id - (String) Unique ID of the alert.

data.interval - (String) Checking interval of the alert, valid values are: 1m, 5m, 15m, 30m, 1h, 6h, 12h, 1d.

data.threshold - (Number) Threshold value of the alert.

data.threshold_type - (above | below) Threshold type of the alert, whether to alert either when the value is above or below the threshold.

data.source - (chart | search) Source of the alert, whether it's from a chart or a saved search.

data.dashboardId - (String) If a chart alert, the ID of the dashboard that the alert is associated with.

data.chartId - (String) If a chart alert, the ID of the chart that the alert is associated with.

data.savedSearchId - (String) If a search alert, the ID of the saved search that the alert is associated with.

data.groupBy - (String) If a search alert, the field or property the count of the search is grouped by.

data.name - (String | null) A custom name assigned to the alert.

data.message - (String | null) A custom message to send with any fired alert.

data.channel - (Object) The alert channel to notify when the threshold is breached.

data.channel.type - (email | slack | pagerduty | opsgenie | slack_webhook) The type of channel to alert.

data.channel.recipients - (String[]) If an email alert, the email addresses to notify.

data.channel.channelId - (String) If a slack alert, the ID of the slack channel to notify.

data.channel.severity - (String) If a Pagerduty alert, the severity to set the alert to (one of critical, error, warning, or info).

data.channel.webhookId - (String) If an Opsgenie alert, the HyperDX Webhook ID associated with the Opsgenie integration.

data.channel.priority - (String) If an Opsgenie alert, the priority of the alert from P0 to P5.

data.channel.webhookId - (String) If an Slack Webhook alert, the HyperDX Webhook ID associated with the Slack webhook.

Create an Alert

Creates a new alert with the given alert configuration.

Request

POST /api/v1/alerts

interval - (String) Checking interval of the alert, valid values are: 1m, 5m, 15m, 30m, 1h, 6h, 12h, 1d.

threshold - (Number) Threshold value of the alert.

threshold_type - (above | below) Threshold type of the alert, whether to alert either when the value is above or below the threshold.

source - (chart | search) Source of the alert, whether it's from a chart or a saved search.

dashboardId - (String) If a chart alert, the ID of the dashboard that the alert is associated with.

chartId - (String) If a chart alert, the ID of the chart that the alert is associated with.

savedSearchId - (String) If a search alert, the ID of the saved search that the alert is associated with.

groupBy - (String) If a search alert, the field or property the count of the search is grouped by.

name - (String | null, Optional) A custom name assigned to the alert.

message - (String | null, Optional) A custom message to send with any fired alert.

channel - (Object) The alert channel to notify when the threshold is breached.

channel.type - (email | slack | pagerduty | opsgenie | slack_webhook) The type of channel to alert.

channel.recipients - (String[]) If an email alert, the email addresses to notify.

channel.channelId - (String) If a slack alert, the ID of the slack channel to notify.

channel.severity - (String) If a Pagerduty alert, the severity to set the alert to (one of critical, error, warning, or info).

channel.webhookId - (String) If an Opsgenie alert, the HyperDX Webhook ID associated with the Opsgenie integration.

channel.priority - (String) If an Opsgenie alert, the priority of the alert from P0 to P5.

channel.webhookId - (String) If an Slack Webhook alert, the HyperDX Webhook ID associated with the Slack webhook.

Response

data - (Object) An object representing a specific alert.

data.id - (String) Unique ID of the alert.

data.interval - (String) Checking interval of the alert, valid values are: 1m, 5m, 15m, 30m, 1h, 6h, 12h, 1d.

data.threshold - (Number) Threshold value of the alert.

data.threshold_type - (above | below) Threshold type of the alert, whether to alert either when the value is above or below the threshold.

data.source - (chart | search) Source of the alert, whether it's from a chart or a saved search.

data.dashboardId - (String) If a chart alert, the ID of the dashboard that the alert is associated with.

data.chartId - (String) If a chart alert, the ID of the chart that the alert is associated with.

data.savedSearchId - (String) If a search alert, the ID of the saved search that the alert is associated with.

data.groupBy - (String) If a search alert, the field or property the count of the search is grouped by.

data.name - (String | null) A custom name assigned to the alert.

data.message - (String | null) A custom message to send with any fired alert.

data.channel - (Object) The alert channel to notify when the threshold is breached.

data.channel.type - (email | slack | pagerduty | opsgenie | slack_webhook) The type of channel to alert.

data.channel.recipients - (String[]) If an email alert, the email addresses to notify.

data.channel.channelId - (String) If a slack alert, the ID of the slack channel to notify.

data.channel.severity - (String) If a Pagerduty alert, the severity to set the alert to (one of critical, error, warning, or info).

data.channel.webhookId - (String) If an Opsgenie alert, the HyperDX Webhook ID associated with the Opsgenie integration.

data.channel.priority - (String) If an Opsgenie alert, the priority of the alert from P0 to P5.

data.channel.webhookId - (String) If an Slack Webhook alert, the HyperDX Webhook ID associated with the Slack webhook.

Update an Existing Alert

Given a specific alert ID, updates the alert with the provided parameters.

Request

PUT /api/v1/alerts/{id}

interval - (String) Checking interval of the alert, valid values are: 1m, 5m, 15m, 30m, 1h, 6h, 12h, 1d.

threshold - (Number) Threshold value of the alert.

threshold_type - (above | below) Threshold type of the alert, whether to alert either when the value is above or below the threshold.

source - (chart | search) Source of the alert, whether it's from a chart or a saved search.

dashboardId - (String) If a chart alert, the ID of the dashboard that the alert is associated with.

chartId - (String) If a chart alert, the ID of the chart that the alert is associated with.

savedSearchId - (String) If a search alert, the ID of the saved search that the alert is associated with.

groupBy - (String) If a search alert, the field or property the count of the search is grouped by.

name - (String | null, Optional) A custom name assigned to the alert.

message - (String | null, Optional) A custom message to send with any fired alert.

channel - (Object) The alert channel to notify when the threshold is breached.

channel.type - (email | slack | pagerduty | opsgenie | slack_webhook) The type of channel to alert.

channel.recipients - (String[]) If an email alert, the email addresses to notify.

channel.channelId - (String) If a slack alert, the ID of the slack channel to notify.

channel.severity - (String) If a Pagerduty alert, the severity to set the alert to (one of critical, error, warning, or info).

channel.webhookId - (String) If an Opsgenie alert, the HyperDX Webhook ID associated with the Opsgenie integration.

channel.priority - (String) If an Opsgenie alert, the priority of the alert from P0 to P5.

channel.webhookId - (String) If an Slack Webhook alert, the HyperDX Webhook ID associated with the Slack webhook.

Response

data - (Object) An object representing a specific alert.

data.id - (String) Unique ID of the alert.

data.interval - (String) Checking interval of the alert, valid values are: 1m, 5m, 15m, 30m, 1h, 6h, 12h, 1d.

data.threshold - (Number) Threshold value of the alert.

data.threshold_type - (above | below) Threshold type of the alert, whether to alert either when the value is above or below the threshold.

data.source - (chart | search) Source of the alert, whether it's from a chart or a saved search.

data.dashboardId - (String) If a chart alert, the ID of the dashboard that the alert is associated with.

data.chartId - (String) If a chart alert, the ID of the chart that the alert is associated with.

data.savedSearchId - (String) If a search alert, the ID of the saved search that the alert is associated with.

data.groupBy - (String) If a search alert, the field or property the count of the search is grouped by.

data.name - (String | null) A custom name assigned to the alert.

data.message - (String | null) A custom message to send with any fired alert.

data.channel - (Object) The alert channel to notify when the threshold is breached.

data.channel.type - (email | slack | pagerduty | opsgenie | slack_webhook) The type of channel to alert.

data.channel.recipients - (String[]) If an email alert, the email addresses to notify.

data.channel.channelId - (String) If a slack alert, the ID of the slack channel to notify.

data.channel.severity - (String) If a Pagerduty alert, the severity to set the alert to (one of critical, error, warning, or info).

data.channel.webhookId - (String) If an Opsgenie alert, the HyperDX Webhook ID associated with the Opsgenie integration.

data.channel.priority - (String) If an Opsgenie alert, the priority of the alert from P0 to P5.

data.channel.webhookId - (String) If an Slack Webhook alert, the HyperDX Webhook ID associated with the Slack webhook.

Delete an Alert

Deletes an alert from the current team. This action is not reversible.

Request

DELETE /api/v1/alerts/{id}

This request takes no parameters.

Request Example

curl --request DELETE \
  --url https://api.hyperdx.io/api/v1/alerts/YOUR_ALERT_ID \
  --header 'Authorization: Bearer YOUR_PERSONAL_API_KEY'

Response

A successful delete operation will return a 200 status code.

Hi, how can I help you?