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

# Sectors history id

## Endpoint

`GET https://gateway.orkeia.ai/sectors/{id}/history`

**Autenticación**\
Requiere encabezado `authorization:  <tu_token>`.

## Parámetros de Camino

| Nombre | Tipo   | Obligatorio | Descripción                     | Ejemplo       |
| ------ | ------ | ----------- | ------------------------------- | ------------- |
| id     | string | Sí          | Identificador único del sector. | SECTOR\_12345 |

## Ejemplo (cURL)

```bash theme={null}
curl -X GET "https://gateway.orkeia.ai/sectors/SECTOR_12345/history" \
  -H "authorization:  <tu_token>"
```

## Respuestas

### Response - Éxito

```json response theme={null}
{
  "status": "OK",
  "data": [
    {
      "id": "hist_001",
      "responsible": "admin@orkeia.ai",
      "action": "updated sector",
      "type": "neutral",
      "date": "2024-07-22T18:00:00.000Z",
      "changes": { "name": "Nuevo nombre" }
    }
  ]
}
```

### 500 — Error del Servidor

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

### 400 — Error del Cliente

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

## Campos del Historial

| Nombre      | Tipo   | Descripción                                                              |
| ----------- | ------ | ------------------------------------------------------------------------ |
| id          | string | Identificador único del evento de historial.                             |
| responsible | string | Nombre/usuario responsable por la alteración.                            |
| action      | string | Acción registrada (ej.: created sector, updated sector, deleted sector). |
| type        | string | Clasificación del evento (`success`, `fail`, `neutral`).                 |
| date        | Date   | Fecha y hora de la alteración.                                           |
| changes     | object | Cambios realizados en los campos del sector, cuando aplicable.           |
