# listDeployments

```graphql
query ListDeployments($input: ListDeploymentsInput!) {
  listDeployments(input: $input) {
    data {
      id
      releaseId
      environmentId
      userId
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List deployments. Requires project.deployments.read.

## Arguments

| Name                     | Type                  | Required | Description                   |
| ------------------------ | --------------------- | -------- | ----------------------------- |
| `input`                  | ListDeploymentsInput! | Yes      |                               |
| `input.projectReference` | String                |          |                               |
| `input.environmentId`    | ID                    |          |                               |
| `input.limit`            | Int                   |          |                               |
| `input.sortBy`           | String                |          | Sort field. Only created\_at. |
| `input.sortOrder`        | String                |          |                               |
| `input.cursor`           | String                |          |                               |

## Variables

```json
{
  "input": {}
}
```

## Responses

| Status | Description                                         |
| ------ | --------------------------------------------------- |
| 200    | The DeploymentsConnection! in data.listDeployments. |

## 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 ListDeployments($input: ListDeploymentsInput!) {\n  listDeployments(input: $input) {\n    data {\n      id\n      releaseId\n      environmentId\n      userId\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "input": {}
  }
}'
```

## Example response

```json
{
  "data": {
    "listDeployments": {
      "data": [
        {
          "id": "string",
          "releaseId": "string",
          "environmentId": "string",
          "userId": "string",
          "createdAt": "2026-01-01T00:00:00Z",
          "updatedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
