> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Alerts

Retrieve a list of alerts.

**Note:** By default, alerts from the last **30 days** are returned. Use the filtering parameters to modify the date range.

<Note>
  External Documentation

  To learn more, visit the [Vega documentation](https://docs.vega.io/api-reference/queries/get-alerts).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter             | Description                                                                                                                                                                                                           |
  | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Alert IDs             | A comma-separated list of alert IDs to filter by.                                                                                                                                                                     |
  | Alert Names           | A comma-separated list of alert names to filter by.                                                                                                                                                                   |
  | Alert Severities      | Select the alert severities to filter by.                                                                                                                                                                             |
  | Alert Verdicts        | Select the alert verdicts to filter by.                                                                                                                                                                               |
  | Data Source Names     | A comma-separated list of data source names to filter by.                                                                                                                                                             |
  | Detection IDs         | A comma-separated list of detection IDs to filter by.                                                                                                                                                                 |
  | Has Related Incidents | Select to filter alerts by whether they are linked to at least one incident.<br /><br />**Note:** `true` returns only alerts linked to incidents, `false` returns only unlinked alerts, and omitting it returns both. |
  | Limit                 | The maximum number of results to return per page. The default is `100`.                                                                                                                                               |
  | Offset                | The number of results to skip for pagination.                                                                                                                                                                         |
  | Origin Type           | Select the lifecycle state of the detection that produced the alerts to filter by.                                                                                                                                    |
  | Return All Pages      | Automatically fetch all resources, page by page.                                                                                                                                                                      |
  | Statuses              | Select the statuses to filter by.                                                                                                                                                                                     |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter    | Description                                                     |
  | ------------ | --------------------------------------------------------------- |
  | From         | The start date and time to filter results by creation time.     |
  | To           | The end date and time to filter results by creation time.       |
  | Updated From | The start date and time to filter results by last updated time. |
  | Updated To   | The end date and time to filter results by last updated time.   |
</div>

## Example Output

```json theme={"dark"}
{
	"data": {
		"getAlerts": {
			"alerts": [
				{
					"id": "<string>",
					"vegaAlertId": "<string>",
					"detectionId": "<string>",
					"name": "<string>",
					"severity": "LOW",
					"status": "OPEN",
					"assignees": [
						{
							"userId": "<string>",
							"displayName": "<string>",
							"email": "<string>"
						}
					],
					"dataSources": [
						"<string>"
					],
					"createdAt": "2024-01-15T09:30:00Z",
					"updatedAt": "2024-01-15T09:30:00Z",
					"relatedIncidents": [
						{
							"incidentId": "<string>",
							"name": "<string>"
						}
					],
					"detectionSource": "<string>",
					"detectionDescription": "<string>",
					"detectionQuery": "<string>",
					"isTestMode": true,
					"verdict": "NA",
					"comments": [
						{
							"text": "<string>",
							"addedBy": "<string>",
							"addedAt": "2024-01-15T09:30:00Z"
						}
					],
					"description": "<string>",
					"assignee": {
						"userId": "<string>",
						"displayName": "<string>",
						"email": "<string>"
					},
					"mitre": {
						"mitreTactics": [
							"<string>"
						],
						"mitreTechniques": [
							"<string>"
						]
					},
					"eventCount": 123,
					"verdictReasoning": "<string>",
					"dedupCount": 123
				}
			],
			"total": 123,
			"limit": 123,
			"offset": 123,
			"error": {
				"code": "<string>",
				"message": "<string>"
			}
		}
	}
}
```

## Workflow Library Example

[List Alerts with Vega and Send Results Via Email](https://library.blinkops.com/workflows/list-alerts-with-vega-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-alerts-with-vega-and-send-results-via-email/canvas" />
</div>
