Skip to Content
ReferenceHTTP APIPOST /api/v1/call/stream

POST /api/v1/call/stream

Preview. Ships with the next server release.

the same call, answered as NDJSON while it runs. Lines: {"chunk": {"stream", "data", "dropped"?}, "seq": n} (or {"sealed_chunk": "...", "seq": n}) for each piece of output, then one last line, as /api/v1/call answers. The status is 200 once the call is sent; how it ended is in the last line.

Request body

FieldTypeAlwaysMeaning
argsanyno
machinestringnoMachine id or unique name; optional when exactly one machine is online.
sealedstringnoThe arguments sealed for the machine, instead of args.
toolstringyes

Responses

StatusMeaningBody
200NDJSON stream of tool chunks and final resultapplication/x-ndjson string
400Invalid callapplication/json
401Unauthorizedapplication/json

Example

curl -sS -X POST "https://<contour>.cmdop.ai/api/v1/call/stream" \ -H "Authorization: Bearer $CMDOP_TOKEN" \ -H "Content-Type: application/json" \ -d '{"machine":"<machine>","tool":"sys_info","args":{}}'