---
title: "Invalidar cache de schema (ADMIN only)"
method: DELETE
path: "/analytics/schema/cache"
tags: ["Schema Discovery"]
---

# Invalidar cache de schema (ADMIN only)

`DELETE /analytics/schema/cache`

## Request

- Base URL: `http://localhost:8081`
- URL: `http://localhost:8081/analytics/schema/cache`
- Auth: HTTP bearer

**Requiere autenticación y rol ADMIN/SUPERADMIN**.

Invalida el cache de schema para una tabla específica o todas las tablas.

**Query params**:
- `table` (opcional): Nombre de tabla específica. Si no se provee, limpia todo el cache.

## Query parameters

- `table` string

## Response `200`

Cache invalidado exitosamente

- object
  - `success` boolean
  - `message` string
  - `table` string

## Other responses

- `401`: No autorizado - Token JWT inválido o faltante. Los rechazos del middleware de autenticación usan el envelope `AuthError` (`{ success, message, code? }`); un `activeTenantId` mal formado devuelve `code: INVALID_ACTIVE_TENANT` (ver `components.responses.InvalidActiveTenant`), un token de tipo no admitido `code: INVALID_TOKEN_TYPE` con `message: Tipo de token no aceptado`, y un token de impersonación cuya sesión terminó `code: IMPERSONATION_SESSION_TERMINATED`.
- `403`: Acceso denegado
- `500`: Error interno del servidor

---

[API](https://skmtc.dev/nevent/apis/nevent-data-api.md) · [All operations](https://skmtc.dev/nevent/apis/nevent-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nevent/apis/nevent-data-api/revisions/81035d32c1c1?raw)
