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
| Field | Type | Always | Meaning |
|---|---|---|---|
args | any | no | |
machine | string | no | Machine id or unique name; optional when exactly one machine is online. |
sealed | string | no | The arguments sealed for the machine, instead of args. |
tool | string | yes |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | Tool result | application/json |
400 | Invalid call | application/json |
401 | Unauthorized | application/json |
502 | Machine/tool failure | application/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":{}}'