<!-- source: https://secondlayer.tools/docs/api-reference#list-deployment-gaps -->

## List a subgraph's gaps

`GET /api/subgraphs/{name}/gaps` (self-hosted instances only)

Block ranges the subgraph failed to process, ordered by start height. Open gaps only by default.

### Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `name` | string, required | Subgraph name, as deployed. Lowercase letters, digits and hyphens. |

### Filters

| Name | Type | Description |
| --- | --- | --- |
| `_offset` | integer | Gaps to skip. Default 0. |
| `resolved` | enum | `true` or `all` include resolved gaps with the open ones. Omit for open gaps only. Values: `true`, `all`. |

### Range and paging

| Name | Type | Description |
| --- | --- | --- |
| `_limit` | integer | Page size, 1 to 1000. Default 50. |

### Returns

A cursor envelope; `data` holds `SubgraphGap` objects.

### Responses

- `200` A page of gaps
- `401` This bind requires the instance token, and it was missing or wrong
- `404` No subgraph by this name on this instance (`SUBGRAPH_NOT_FOUND`)

### Example

```bash
curl http://127.0.0.1:3800/api/subgraphs/{name}/gaps \
  -H "Authorization: Bearer $INSTANCE_TOKEN"
```

```json
{
  "data": [
    {
      "start": 8412207,
      "end": 8412207,
      "size": 1,
      "reason": "processing_error",
      "detectedAt": "2026-09-22T18:40:03.000Z",
      "resolvedAt": null
    }
  ],
  "meta": {
    "total": 1,
    "totalMissingBlocks": 1,
    "limit": 50,
    "offset": 0
  }
}
```
