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

## List a subgraph's print violations

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

Print events a handler skipped because the payload did not match the source's declared `prints` schema, newest first. The instance keeps the last 100 per subgraph.

### Path parameters

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

### Range and paging

| Name | Type | Description |
| --- | --- | --- |
| `limit` | integer | Page size, 1 to 100. Default 50. |

### Returns

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

### Responses

- `200` Recent violations
- `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}/violations \
  -H "Authorization: Bearer $INSTANCE_TOKEN"
```

```json
{
  "data": [
    {
      "id": "c41d8e27-6f0a-4b93-a5e2-7d19b3c8f056",
      "sourceName": "swaps",
      "blockHeight": 9031477,
      "txId": "0x8d2f6a91c4e07b35d1a8f2e69c0b47d3a5e18f62b9c04d7e3a16f58b2c9d0e41",
      "reason": "missing declared field \"amount-in\"",
      "samplePayload": {
        "topic": "swap",
        "data": {
          "amount-out": "1500000",
          "sender": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9"
        }
      },
      "seenAt": "2026-09-23T11:27:45.000Z"
    }
  ],
  "meta": {
    "total": 1,
    "limit": 50
  }
}
```
