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

# Historial General de Sectores

> Devuelve el historial general de cambios de sectores.

## Endpoint

`GET https://gateway.orkeia.ai/sectors/history`

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

## Ejemplo (cURL)

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

## Respuestas

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": [
    {
      "id": "hist_001",
      "sectorId": "SECTOR_12345",
      "responsible": "admin@orkeia.ai",
      "action": "created sector",
      "type": "success",
      "date": "2024-07-22T14:25:18.000Z"
    }
  ]
}
```

### 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.                            |
| sectorId    | string | Identificador del sector asociado al evento.                            |
| responsible | string | Nombre/usuario responsable por la modificació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 modificación.                                        |
