PowerExecutor Docs
← Console

API reference

Base URL: http://localhost:8040 (local) or https://executor-api.planningpowertools.com. Consequential endpoints (marked 🔒) require the X-Approval-PIN header when the server sets POWEREXECUTOR_PIN.

Health & status

MethodPathPurpose
GET/health{"status":"healthy"} — liveness.
GET/api/admin/statusKill-switch, degraded reason, actions used today.

Cycles & reports

MethodPathPurpose
POST/api/cycle/run?product=…Run one operating cycle now. Returns the report.
GET/api/reports/latest?product=…The most recent cycle report (404 if none).

Approvals

MethodPathPurpose
GET/api/approvals?product=…&status=pendingList approvals by status.
POST 🔒/api/approvals/{id}/approve?product=…Execute the action. 503 if the safety envelope blocks (stays pending).
POST 🔒/api/approvals/{id}/reject?product=…Discard the approval.

Autonomy

MethodPathPurpose
GET/api/autonomy?product=…Per-capability level, streak, and last-change reason.
POST 🔒/api/autonomy/setBody {product, capability_id, level} (level 1–3).

Safety

MethodPathPurpose
POST 🔒/api/admin/kill-switchBody {on: true|false}.
POST 🔒/api/admin/degraded/clearClear degraded mode.

Example

curl "http://localhost:8040/api/approvals?product=powermarketing"

curl -X POST "http://localhost:8040/api/approvals/<id>/approve?product=powermarketing" \
  -H "X-Approval-PIN: 1234"

curl -X POST "http://localhost:8040/api/autonomy/set" \
  -H "Content-Type: application/json" -H "X-Approval-PIN: 1234" \
  -d '{"product":"powermarketing","capability_id":"update_post","level":2}'
Interactive OpenAPI docs are also served by the API at /docs.