# sandboxBackgroundCommands

```graphql
query SandboxBackgroundCommands($sandboxId: ID!) {
  sandboxBackgroundCommands(sandboxId: $sandboxId) {
    data {
      commandId
      command
      status
      signal
      heartbeatStatus
      lastHeartbeatAt
      lastHeartbeatError
      heartbeatFailureCount
      exitCode
      startedAt
      finishedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
      self
      first
      next
      prev
    }
  }
}
```

List background commands. Requires project.sandboxes.manage.

## Arguments

| Name        | Type   | Required | Description |
| ----------- | ------ | -------- | ----------- |
| `sandboxId` | ID!    | Yes      |             |
| `cursor`    | String |          |             |
| `limit`     | Int    |          |             |

## Variables

```json
{
  "sandboxId": "string"
}
```

## Responses

| Status | Description                                                                |
| ------ | -------------------------------------------------------------------------- |
| 200    | The SandboxBackgroundCommandCollection! in data.sandboxBackgroundCommands. |

## 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 SandboxBackgroundCommands($sandboxId: ID!) {\n  sandboxBackgroundCommands(sandboxId: $sandboxId) {\n    data {\n      commandId\n      command\n      status\n      signal\n      heartbeatStatus\n      lastHeartbeatAt\n      lastHeartbeatError\n      heartbeatFailureCount\n      exitCode\n      startedAt\n      finishedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n      self\n      first\n      next\n      prev\n    }\n  }\n}",
  "variables": {
    "sandboxId": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "sandboxBackgroundCommands": {
      "data": [
        {
          "commandId": "string",
          "command": "string",
          "status": "pending",
          "signal": "string",
          "heartbeatStatus": "disabled",
          "lastHeartbeatAt": "2026-01-01T00:00:00Z",
          "lastHeartbeatError": "string",
          "heartbeatFailureCount": 0,
          "exitCode": 0,
          "startedAt": "string",
          "finishedAt": "string"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string",
        "self": "string",
        "first": "string",
        "next": "string",
        "prev": "string"
      }
    }
  }
}
```
