> ## 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.

# Handler for GET /api/v1/kb/history

> **Required scope:** read

**Required scope:** `read`

### Query parameters

<ParamField query="since" type="string">
  RFC3339 lower bound timestamp
</ParamField>

<ParamField query="until" type="string">
  RFC3339 upper bound timestamp
</ParamField>

<ParamField query="org_id" type="string">
  Optional org filter
</ParamField>

<ParamField query="limit" type="integer">
  Max events to return (default 100)
</ParamField>

### Response

`HistoryResponse`

<ResponseField name="enriched_events" type="HistoryEventView[]" required>
  <Expandable title="HistoryEventView">
    <ResponseField name="actor" type="string" required />

    <ResponseField name="entity_ids" type="string[]" required />

    <ResponseField name="entity_names" type="string[]" required />

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

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

    <ResponseField name="metadata" type="object" required />

    <ResponseField name="object" type="string" />

    <ResponseField name="object_name" type="string" />

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

    <ResponseField name="predicate" type="string" />

    <ResponseField name="subject" type="string" />

    <ResponseField name="subject_name" type="string" />

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

    <ResponseField name="timestamp" type="string (date-time)" required />
  </Expandable>
</ResponseField>

<ResponseField name="events" type="KBEvent[]" required>
  <Expandable title="KBEvent">
    <ResponseField name="actor" type="string" required>
      Who/what caused this event
    </ResponseField>

    <ResponseField name="event_type" type="KBEventType" required>
      <Expandable title="KBEventType">
        <ResponseField name="entity_id" type="string" required />

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

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

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

    <ResponseField name="id" type="string" required>
      Unique event ID
    </ResponseField>

    <ResponseField name="metadata" type="object" required>
      Optional metadata
    </ResponseField>

    <ResponseField name="org_id" type="string" required>
      Organization scope
    </ResponseField>

    <ResponseField name="timestamp" type="string (date-time)" required>
      When this event occurred
    </ResponseField>
  </Expandable>
</ResponseField>

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

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | KB history events                                  |
| `400` | Invalid timestamp                                  |
| `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/kb/history' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "enriched_events": [
      {
        "actor": "string",
        "entity_ids": [],
        "entity_names": [],
        "event_type": "string",
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "metadata": {},
        "object": "string",
        "object_name": "string",
        "org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "predicate": "string",
        "subject": "Replacement tent pole set",
        "subject_name": "string",
        "summary": "Two-person tent, green — replacement for damaged pole set.",
        "timestamp": "2026-08-31T14:22:05Z"
      }
    ],
    "events": [
      {
        "actor": "string",
        "event_type": {
          "entity_id": null,
          "entity_type": null,
          "name": null,
          "type": null
        },
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "metadata": {},
        "org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "timestamp": "2026-08-31T14:22:05Z"
      }
    ],
    "total": 102
  }
  ```
</ResponseExample>
