api.ilyama.golain.io. Set these before running the examples:
Management responses use the envelope
"ok": 1 with a data object. Invoke success returns Connect JSON for the protobuf response message. Invoke errors return { "ok": false, "message": "…" }.
Authentication
Every route requires:
Invoke and enqueue also require
Content-Type: application/json and Connect-Protocol-Version: 1.
Permissions
Rate limits
Back off on
429, 502, and 503.
List device services
can_invoke_rpc
data fields:
services is empty when no schema is bound yet.
Example:
Reflect device schema
can_write_device_metadata
Forces the platform to reflect gRPC services from the device (when online), register the descriptor if new, and bind the device. Skips the device round-trip when the digest is already cached for the project.
Request body: {}
data fields:
Get project descriptor
sha256: → sha256%3A).
Response data fields:
You do not need this endpoint for basic invoke — the proxy loads descriptors automatically.
List invocation audit trail
can_invoke_rpc
Query parameters: page (default 1), limit (default 50).
Pass the same session_id you used as ?session_id= on invoke calls.
ok: 1, data.items[], and pagination meta (page, limit, total).
Each item:
Raw request and response bodies are never stored.
Get queued call status
can_invoke_rpc
Poll after enqueue. Uses the management API on api.ilyama.golain.io, not the RPC host.
data fields:
→ Step-by-step guide: Queued invoke
Sync invoke
can_invoke_rpc
Query: optional session_id (UUID) for audit grouping.
Headers: Authorization, ORG-ID, Content-Type: application/json, Connect-Protocol-Version: 1
Body: JSON object matching the protobuf request message.
{ "ok": false, "message": "…" } with HTTP 4xx/5xx.
→ Caller guide: Invoking methods
Server stream (SSE)
can_invoke_rpc
Query: optional session_id (UUID) for audit grouping.
Headers: Authorization, ORG-ID, Content-Type: application/json, Accept: text/event-stream
Body: JSON object matching the protobuf request message (same as unary).
text/event-stream with SSE events:
Errors: JSON
{ "ok": false, "message": "…" } with HTTP 4xx/5xx before the stream opens, or an error SSE event mid-stream.
Only methods with method_type: "server_stream" belong on this path. Unary methods on /streams/ return 501 only server-streaming rpc supported. Server-stream methods on the sync path return 501 streaming rpc not supported.
→ Caller guide: Invoking methods — Stream a method (SSE)
Enqueue (async invoke)
can_invoke_rpc
Query: optional ttl_seconds — default 900, clamped 60–86400.
Headers: same as sync invoke; add Idempotency-Key when retrying the same enqueue.
202 Accepted) — flat envelope, not nested under data:
GET …/rpc/queued/{call_id} on the management API.
Queued delivery is at-least-once. Device handlers must be idempotent — see Queued invoke.
OpenAPI playground
These management routes appear in the API Reference tab under Device RPC:GET /projects/{project_id}/devices/{device_id}/rpc/servicesPOST /projects/{project_id}/devices/{device_id}/rpc/reflectGET /projects/{project_id}/devices/{device_id}/rpc/sessions/{session_id}/invocationsGET /projects/{project_id}/devices/{device_id}/rpc/queued/{call_id}GET /projects/{project_id}/rpc/descriptors/{digest}
https://rpc.ilyama.golain.io).
Related
- Invoking methods — sync invoke walkthrough and error codes
- Queued invoke — enqueue, poll, idempotency
- Troubleshooting — when calls fail
- Omega setup — device-side configuration