Referencia APIAPI Reference
Health check
Comprobar si el servicio está en ejecución
GET /healthAutorizaciones
| Parámetro | Tipo | Ubicación | Requerido | Descripción |
|---|---|---|---|---|
Authorization | string | header | sí | API key de SpainMCP como Bearer token |
Respuesta
200 — application/json
El servicio está operativo.
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
status | string | sí | Estado del servicio |
timestamp | string | sí | Timestamp de la respuesta |
{
"status": "<string>",
"timestamp": "<string>"
}500 — Error interno del servidor
Ejemplo
import SpainMCP from '@spainmcp/api';
const client = new SpainMCP({
apiKey: process.env['SPAINMCP_API_KEY'],
});
const response = await client.health.check();
console.log(response.status);¿Te ha sido útil esta página?