Skip to Content
ReferenceHTTP APIPOST /api/v1/call

POST /api/v1/call

Preview. Ships with the next server release.

POST /api/v1/call {machine?, tool, args | sealed} → {"ok": result}, {"sealed": answer} or {"error": {code, message}}.

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
200Tool resultapplication/json
400Invalid callapplication/json
401Unauthorizedapplication/json
502Machine/tool failureapplication/json

Example

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