Skip to main content
Version: v0.1 (Stable)

REST API Conventions & Authentication

The ActonOS HTTP API follows modern RESTful conventions, providing predictable resource-oriented URLs, standard HTTP response codes, and consistent JSON envelope formatting.


1. Base URL & Protocol​

  • Local LAN: http://acton.local:8080/api (or http://localhost:8080/api)
  • Remote Mesh: https://acton.<tailnet>.ts.net/api
  • Reverse Proxy: https://agent.yourdomain.com/api

2. Authentication​

All requests to /api/* (except /api/health and the OAuth callback handler) require authentication:

The web frontend uses an HttpOnly, SameSite=Strict cookie named actonos_token issued upon successful PIN authentication.

Method B: Bearer Token (CLI & External Scripts)​

Include the Bearer authorization header with your configured Admin PIN or API token:

Authorization: Bearer YOUR_ADMIN_PIN_OR_TOKEN

3. Standard Response Envelopes​

Successful Responses​

Successful responses encapsulate the payload inside a top-level data object:

{
"data": {
"status": "healthy",
"version": "0.1.0",
"uptime_seconds": 86400,
"runtime_mode": "baremetal"
}
}

Error Responses​

Error responses return a standardized error envelope accompanied by an appropriate HTTP status code:

{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "Agent with ID 'devops-bot' does not exist in registry.",
"details": {
"requested_id": "devops-bot"
}
}
}

4. Standard HTTP Status Codes​

CodeMeaningDescription
200 OKSuccessStandard successful GET, PUT, or POST response.
201 CreatedCreatedResource successfully created.
202 AcceptedApproval RequiredThe requested mutation requires human clearance; an approval record has been created.
400 Bad RequestValidation ErrorMalformed JSON payload or missing required parameter.
401 UnauthorizedAuth RequiredMissing or invalid Bearer token / session cookie.
403 ForbiddenAccess DeniedInsufficient permissions for the requested tool or path.
404 Not FoundNot FoundRequested agent, run, or workspace file does not exist.
429 Too Many RequestsRate LimitedUpstream LLM provider rate limit exceeded.
500 Server ErrorInternal ErrorAn unhandled exception occurred in the daemon core.