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

# Histórico da Base de Conhecimento

> Retorna o histórico de mudanças de uma base de conhecimento específica.

## Endpoint

`GET https://gateway.orkeia.ai/knowledge-bases/{id}/history`

**Autenticação**\
Requer cabeçalho `authorization:  <seu_token>`.

## Cabeçalhos

```
authorization: <seu_token>
```

## Parâmetros de Caminho

| Nome | Tipo   | Obrigatório | Descrição                              | Exemplo    |
| ---- | ------ | ----------- | -------------------------------------- | ---------- |
| id   | string | Sim         | Identificador da base de conhecimento. | KB\_123456 |

## Exemplo (cURL)

```bash theme={null}
curl -X GET "https://gateway.orkeia.ai/knowledge-bases/KB_123456/history" \
  -H "authorization:  <seu_token>"
```

## Respostas

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": [
    {
      "id": "hist_001",
      "responsible": "João Vitor",
      "responsibleId": "user_123",
      "action": "updated knowledge base",
      "type": "neutral",
      "date": "2024-07-22T18:00:00Z",
      "versionControl": "v1.0.1"
    }
  ]
}
```

### 500 — Server Error

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```

## Campos do Histórico

| Nome           | Tipo   | Descrição                                                   |
| -------------- | ------ | ----------------------------------------------------------- |
| id             | string | Identificador único do evento de histórico.                 |
| responsible    | string | Nome do responsável pela alteração.                         |
| responsibleId  | string | ID do usuário ou sistema que realizou a alteração.          |
| action         | string | Ação registrada (ex.: created, updated, deleted).           |
| type           | string | Classificação do evento (`success`, `fail`, `neutral`).     |
| date           | Date   | Data e hora da alteração.                                   |
| versionControl | string | Identificador da versão associada ao evento (se aplicável). |
