Skip to main content
Cloud callers invoke device methods through a dedicated RPC proxy at https://rpc.ilyama.golain.io. The proxy authenticates your user token, transcodes JSON to protobuf, relays the call to the device, and returns a JSON response (unary) or an SSE event stream (server-stream). For offline-tolerant or retry-friendly workflows, use Queued invoke (/enqueue/{Service}/{Method}) instead of blocking on the device. Queued invoke is unary-only.
Invoke, stream, and enqueue use the RPC host (https://rpc.ilyama.golain.io) — not the management API on api.ilyama.golain.io. Management routes (list services, reflect, audit, poll queued calls) stay on https://api.ilyama.golain.io/core/api/v1/....

Before you invoke

  1. Device is online with device-rpc running and schema bound — see Omega setup.
  2. Your user has can_invoke_rpc on the target device.
  3. You know the full protobuf service name and method name — discover them via the services API below.

Discover available methods

Example response:
Use the exact name values in the invoke URL:

Invoke endpoint (unary)

Optional query parameter: ?session_id={uuid} — groups invocation traces for audit queries. Generate any UUID; no separate session-create API is required.

Required headers (unary)

Same authentication as the Console and /core/api/v1 — see Platform concepts — Authentication.

Example: Echo unary call

Expected success body (Connect JSON):
Request fields match the protobuf message schema — for Echo, see EchoRequest in the echo proto.

Stream a method (SSE)

Server-streaming methods use a separate URL path and return Server-Sent Events instead of Connect JSON.

Required headers (stream)

Use curl -N (no buffer) so events print as they arrive. Optional ?session_id= works the same as unary invoke.

Example: EchoServerStream

SSE event types

Decode each message event’s data with your protobuf response type after base64 decode.
There is no cloud enqueue path for streams. Use sync unary invoke or server-stream only while the device is online.

Permissions

Missing permission returns 403 forbidden.

Audit invocation history

After invoking with ?session_id=, query traces on the management API:
Each row includes service_name, method_name, grpc_status_code, latency_ms, and payload digests — not raw request/response bodies.

Local development

When running ilyama locally:
With AUTH_BYPASS=true, e2e tests use Authorization: Bearer test-bypass-token and optional X-Test-User-ID.

Manual schema refresh

If the device firmware changed but announce did not run, force reflection:
Requires can_write_device_metadata. Returns updated descriptor_digest, services, and schema_bound — see API reference.

Streaming errors (501)

Use the sync path for unary methods and /streams/ for server_stream methods only.

Common errors

Troubleshooting
Connect JSON (Content-Type: application/json, Connect-Protocol-Version: 1) is the simplest path for unary curl and scripts. The same unary URL also accepts Connect binary and gRPC via content negotiation if you use generated clients.