Run Tool Body Api V1 Workstreams Tools Run Body Post
post
/api/v1/workstreams/tools/run-bodyRun a tool body on sample inputs without saving it
Runs the Python body once in the sandbox on the sample inputs and records the run for the caller. Nothing is created or saved. A body must have a successful run by the same person in the last 30 minutes before it can be created or saved.
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
bodyrequired | string | Python source defining run(params) -> dict. |
parameters | object | JSON Schema the sample inputs must satisfy.show nestedEmpty object. |
params | object | The sample inputs.show nestedEmpty object. |
expected_body_sha256 | string | null | Refuse the run when the body's sha256 differs from this. |
Responses
200Successful Response
| Field | Type | Description |
|---|---|---|
statusrequired | string | — |
resultrequired | any | — |
duration_ms | integer | null | — |
executor | string | null | — |
tool_version | string | null | — |
limitsrequired | object | —show nestedEmpty object. |
allowed_importsrequired | string[] | — |
body_sha256required | string | — |
422Validation Error
| Field | Type | Description |
|---|---|---|
detail | ValidationError[] | —item shape |
curl https://api.dev.arch.ie/api/v1/workstreams/tools/run-body \
-X POST \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"body": "string",
"parameters": {},
"params": {},
"expected_body_sha256": null
}'