API d'ingestion

Les bureaux poussent leur état vers la plateforme — heartbeats, statuts, activité, événements. C'est un flux sortant uniquement: la plateforme n'ouvre aucun accès entrant vers votre machine.

Authentification

Chaque bureau a un slug unique et une clé d'API (générée à la création, régénérée à chaque apm run connect). Deux en-têtes :

x-bureau-slug: mon-bureau
x-bureau-key: bk_xxx

POST /api/ingest

curl -X POST https://platform.lebureau.tech/api/ingest \
  -H 'content-type: application/json' \
  -H 'x-bureau-slug: mon-bureau' \
  -H 'x-bureau-key: bk_xxx' \
  -d '{"kind":"heartbeat","status":"working","activity":"veille marché"}'
ChampRôle
kindType d'événement (heartbeat, task, libre).
statusStatut du bureau : idle, working, blocked, failed. Met à jour l'instantané affiché au tableau de bord.
activityDescription courte de l'activité en cours.
payloadObjet JSON libre (agent, tâche, détails) — conservé dans la timeline.

Les heartbeats sont émis sur tous les états terminaux (succès, échec, abandon) : un bureau silencieux se voit.

Erreurs — Problem Details (RFC 9457)

Toutes les erreurs sont typées, en application/problem+json, avec un code stable sur lequel brancher vos clients :

{
  "type": "https://platform.lebureau.tech/problems/invalid_authentication",
  "title": "Authentification invalide",
  "status": 401,
  "code": "invalid_authentication",
  "detail": "slug ou clé d'API invalide"
}

Codes : validation_error, unauthorized, invalid_authentication, forbidden, not_found, slug_taken, internal_error.