Human-oriented runtime API guide.
Machine contract authority:
- OpenAPI:
schemas/http/runtime-http.openapi.v0.yaml - Contract examples:
tests/contracts/runtime-http/examples/ - Baseline:
docs/contracts/runtime-http-baseline.md
Use this file for operational semantics and practical examples.
- Base URL default:
http://127.0.0.1:8080 - JSON content type:
application/json - API prefix:
/v0 - No auth model in v0
CORS behavior comes from runtime config (http.cors_*).
All JSON responses include status:
{
"status": {
"code": "OK",
"message": "ok"
}
}Common status-code mapping:
| Code | HTTP |
|---|---|
OK |
200 |
INVALID_ARGUMENT |
400 |
NOT_FOUND |
404 |
FAILED_PRECONDITION |
409 |
UNAVAILABLE |
503 |
DEADLINE_EXCEEDED |
504 |
INTERNAL |
500 |
GET /v0/runtime/status- high-level runtime/provider summary.GET /v0/providers/health- per-provider lifecycle/supervision and device health.
GET /v0/devicesGET /v0/devices/{provider_id}/{device_id}/capabilities
GET /v0/stateGET /v0/state/{provider_id}/{device_id}(supports repeatedsignal_idfilters)
POST /v0/call
Notes:
- Request currently requires
function_id. - Args use typed ADPP value encoding.
GET /v0/modePOST /v0/modeGET /v0/parametersPOST /v0/parametersGET /v0/automation/treeGET /v0/automation/status
GET /v0/events(SSE)
Optional query filters:
provider_iddevice_idsignal_id
Current event names:
state_updatequality_changedevice_availabilitymode_changeparameter_changebt_errorprovider_health_change
ADPP value payload format:
| Type | Example |
|---|---|
double |
{"type":"double","double":1.23} |
int64 |
{"type":"int64","int64":-42} |
uint64 |
{"type":"uint64","uint64":42} |
bool |
{"type":"bool","bool":true} |
string |
{"type":"string","string":"AUTO"} |
bytes |
{"type":"bytes","base64":"AAECAw=="} |
Signal quality values:
OKSTALEUNAVAILABLEFAULT
Device-level quality is computed as worst signal quality.
curl -s http://127.0.0.1:8080/v0/runtime/status | jqcurl -s http://127.0.0.1:8080/v0/providers/health | jqcurl -s http://127.0.0.1:8080/v0/devices | jq
curl -s http://127.0.0.1:8080/v0/devices/sim0/motorctl0/capabilities | jqcurl -s http://127.0.0.1:8080/v0/state | jq
curl -s "http://127.0.0.1:8080/v0/state/sim0/motorctl0?signal_id=motor1_duty" | jqcurl -s -X POST http://127.0.0.1:8080/v0/call \
-H "Content-Type: application/json" \
-d '{
"provider_id": "sim0",
"device_id": "motorctl0",
"function_id": 10,
"args": {
"motor_index": {"type": "int64", "int64": 1},
"duty": {"type": "double", "double": 0.75}
}
}' | jqcurl -s http://127.0.0.1:8080/v0/mode | jq
curl -s -X POST http://127.0.0.1:8080/v0/mode \
-H "Content-Type: application/json" \
-d '{"mode":"MANUAL"}' | jq
curl -s http://127.0.0.1:8080/v0/parameters | jq
curl -s -X POST http://127.0.0.1:8080/v0/parameters \
-H "Content-Type: application/json" \
-d '{"name":"temp_setpoint","value":30.0}' | jqcurl -N http://127.0.0.1:8080/v0/eventsExample:
{
"status": {
"code": "NOT_FOUND",
"message": "Device not found: sim0/nonexistent"
}
}docs/http/README.md- HTTP contract validation workflow.tests/contracts/runtime-http/examples/manifest.yaml- fixture inventory.