Files
2026-07-13 12:30:54 +08:00

1.2 KiB

sidebar_position, _i18n_hash
sidebar_position _i18n_hash
4 0a395db245537dd2e052b4525326e318

Estado (incidentes en curso)

El modelo de Estado gestiona incidentes en curso con un eventId inmutable. Puedes actualizar repetidamente el mismo eventId hasta que se resuelva.

Endpoints

  • Insertar/Actualizar estado (público): POST /open/feed/{channelId}/state/upsert
  • Resolver estado (autenticar): POST /open/workspace/{workspaceId}/feed/{channelId}/state/resolve
  • Listar estados en curso (autenticar): GET /open/workspace/{workspaceId}/feed/state/all?channelId=...&limit=...

Cuerpo de actualización

{
  "eventId": "deploy#2025-08-12",
  "eventName": "deploy_progress",
  "eventContent": "Despliegue 60%",
  "tags": ["prod"],
  "source": "ci",
  "senderId": "runner-42",
  "senderName": "GitHub Actions",
  "important": true,
  "payload": {"stage": "canary"}
}

Si el canal está configurado con webhookSignature, debes incluir el encabezado x-webhook-signature.

Ejemplo de resolución

curl -X POST \
  "$BASE_URL/workspace/$WORKSPACE_ID/feed/$CHANNEL_ID/state/resolve" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"stateId": "STATE_ID"}'