> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List all constraints

> **Required scope:** read

**Required scope:** `read`

### Query parameters

<ParamField query="limit" type="integer">
  Maximum number of items to return (1-1000, default: 50)
</ParamField>

<ParamField query="offset" type="integer">
  Number of items to skip (default: 0)
</ParamField>

<ParamField query="cursor" type="string">
  Cursor for cursor-based pagination (alternative to offset)
</ParamField>

<ParamField query="sort" type="string">
  Sort field with optional direction prefix (- for descending) Examples: 'created\_at', '-name', 'confidence'
</ParamField>

### Response

`ListConstraintsResponse`

<ResponseField name="constraints" type="ConstraintResponse[]" required>
  <Expandable title="ConstraintResponse">
    <ResponseField name="description" type="string" required />

    <ResponseField name="expression" type="string" required />

    <ResponseField name="id" type="string" required />

    <ResponseField name="source" type="string" required />

    <ResponseField name="strength" type="ConstraintStrengthRequest" required>
      <Expandable title="ConstraintStrengthRequest">
        <ResponseField name="type" type="string" required />
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="hard_count" type="integer" required />

<ResponseField name="soft_count" type="integer" required />

<ResponseField name="total" type="integer" required />

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | List of constraints                                |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.nsr.stateset.com/api/v1/constraints' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "constraints": [
      {
        "description": "Two-person tent, green — replacement for damaged pole set.",
        "expression": "string",
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "source": "string",
        "strength": {
          "type": null
        }
      }
    ],
    "hard_count": 1,
    "soft_count": 1,
    "total": 102
  }
  ```
</ResponseExample>
