Answer a run parked awaiting input: proceed, narrow, background or cancel
const url = 'http://localhost:11044/api/v1/admin/kg/runs/example/answer';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"choice":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/admin/kg/runs/example/answer \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "choice": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The run handle returned by a background or timed-out execution.
Query Parameters
Section titled “Query Parameters”Optional, and never needed: the call always acts as the signed-in principal. Naming the principal changes nothing; naming anyone else is refused with 403.
Request Bodyrequired
Section titled “Request Bodyrequired”The owner’s pick, in choice: one of the options the parked run’s question offers — proceed, narrow, background or cancel for a cost-gate park, or the offered values for any other question — matched trimmed and case-insensitively; anything else is a 400 listing the accepted values. proceed and background resume the run; narrow and cancel settle it CANCELLED without running
The owner’s answer to a run parked awaiting input, sent to /runs/{runId}/answer.
object
One of the options the parked run’s question offers — for a cost-gate question proceed, narrow, background or cancel. Matched trimmed and case-insensitively.
Example generated
{ "choice": "example"}Responses
Section titled “Responses”The choice was accepted; the run’s new state travels back
Acknowledgement that a parked run accepted the owner’s choice.
object
The choice exactly as the request sent it.
The run id from the path, echoed back.
The state the run moved to as a result.
Example generated
{ "choice": "example", "runId": "example", "state": "example"}Unknown choice
A rejected run answer, listing the choices this endpoint accepts.
object
Names the choice that was refused.
The accepted values for choice.
Example generated
{ "error": "example", "valid": [ "example" ]}No authenticated principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}username names someone other than the signed-in principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}No such run or not yours
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}Run not awaiting input
The run was not awaiting input; its actual state travels with the refusal.
object
Why it is in that state, when anything was recorded. Null otherwise.
Always run is not awaiting input; state says what the run is doing instead.
The run’s real state: RUNNING, COMPLETED, KILLED, FAILED, CANCELLED or EXPIRED.
Example generated
{ "detail": "example", "error": "example", "state": "example"}
