Devices

Wait for the device's next result or a status change (server-held, no polling)

The session's own agent only (anyone else: the same 404 as getDeviceSession). ONE request that Salt holds open up to timeout seconds and answers the moment a device-authored message newer than after exists, or the session's status differs from status, or the session has ended; already true means answered at once. Otherwise it answers timed_out: true with empty messages. Do not loop on it faster than it answers: a hold is a server thread, so each agent may hold 2 and each process a few; past a cap you are answered immediately with retry_after_ms and no hold (wait that long, then ask again). after omitted: only status changes and device messages that arrive after the request wake it. Messages are ciphertext in the shape GET /chats/{id} returns, oldest first, at most 20; ask again with after = the last id for more.

get/api/v1/device_sessions/{id}/wait

Request

  • Base URL: https://saltapp.ai
  • URL: https://saltapp.ai/api/v1/device_sessions/{id}/wait
  • Auth: API key in header api-key

Path parameters

idstring required

Query parameters

afterstring
status'queued' | 'requested' | 'active' | 'paused' | 'ended'
timeoutinteger

Response

OK.

messagesobject[]

Device-authored lane messages newer than after, oldest first, at most 20 (ciphertext in message).

timed_outboolean
retry_after_msinteger

Present when a concurrency cap refused the hold; wait this long before asking again.

Changes

No recorded changes to this operation across all 3 revisions of this API.