External APIs — /api/zeq/apis/:slug*
The machine-scoped external-API registry — the APIs drawer in the Workbench, and the CLI's apis commands. The owner stores a friendly name, base URL, optional auth header, and optional schema JSON; a state contract's api_call action then references the API by name instead of hardcoding a URL or secret. Owner-gated.
Concept: State Contracts → actions.
Source: shared/api-core/src/routes/apisRoutes.ts.
Endpoints
| Method | Path | Auth | Notes |
|---|---|---|---|
GET | /api/zeq/apis/:slug | Bearer (owner) | List registered APIs on the machine. |
POST | /api/zeq/apis/:slug | Bearer (owner) | Register a new API (name, base URL, auth header, schema). |
PATCH | /api/zeq/apis/:slug/:id | Bearer (owner) | Update a registered API. |
DELETE | /api/zeq/apis/:slug/:id | Bearer (owner) | Remove a registered API. |
POST | /api/zeq/apis/:slug/:id/test | Bearer (owner) | Test the connection / auth. |
CLI equivalents: apis · apis add <name> <url> · apis test <id> · apis remove <id> (see Zeq CLI).