# projectAlerts

```graphql
query ProjectAlerts($projectReference: ID!) {
  projectAlerts(projectReference: $projectReference) {
    data {
      id
      ruleId
      title
      status
      errorCode
      runKind
      runStatus
      startedAt
      resolvedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List project alerts. Requires project.logs.read.

## Arguments

| Name               | Type            | Required | Description                                                                                                 |
| ------------------ | --------------- | -------- | ----------------------------------------------------------------------------------------------------------- |
| `projectReference` | ID!             | Yes      | Project UUID or slug.                                                                                       |
| `status`           | \[AlertStatus!] |          | Only alerts in one of these statuses. Omit for firing and resolved alerts. One of `firing`, `resolved`.     |
| `sortOrder`        | AlertSortOrder  |          | Order by first seen time; ties break by id ascending. Defaults to desc, newest first. One of `asc`, `desc`. |
| `limit`            | Int             |          | Alerts per page, 1 to 100; default 20.                                                                      |
| `cursor`           | String          |          | The previous page's pageInfo.endCursor.                                                                     |

## Variables

```json
{
  "projectReference": "string"
}
```

## Responses

| Status | Description                                  |
| ------ | -------------------------------------------- |
| 200    | The ProjectAlertPage! in data.projectAlerts. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query ProjectAlerts($projectReference: ID!) {\n  projectAlerts(projectReference: $projectReference) {\n    data {\n      id\n      ruleId\n      title\n      status\n      errorCode\n      runKind\n      runStatus\n      startedAt\n      resolvedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "projectReference": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "projectAlerts": {
      "data": [
        {
          "id": "string",
          "ruleId": "string",
          "title": "string",
          "status": "firing",
          "errorCode": "string",
          "runKind": "string",
          "runStatus": "string",
          "startedAt": "2026-01-01T00:00:00Z",
          "resolvedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
