Skip to content

Answer a run parked awaiting input: proceed, narrow, background or cancel

POST
/api/v1/admin/kg/runs/{runId}/answer
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" }'
runId
required
string

The run handle returned by a background or timed-out execution.

username
string

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.

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

Media typeapplication/json

The owner’s answer to a run parked awaiting input, sent to /runs/{runId}/answer.

object
choice
required

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.

string

Example generated

{
"choice": "example"
}

The choice was accepted; the run’s new state travels back

Media typeapplication/json

Acknowledgement that a parked run accepted the owner’s choice.

object
choice
required

The choice exactly as the request sent it.

string
runId
required

The run id from the path, echoed back.

string
state
required

The state the run moved to as a result.

string

Example generated

{
"choice": "example",
"runId": "example",
"state": "example"
}

Unknown choice

Media typeapplication/json

A rejected run answer, listing the choices this endpoint accepts.

object
error
required

Names the choice that was refused.

string
valid
required

The accepted values for choice.

Array<string>

Example generated

{
"error": "example",
"valid": [
"example"
]
}

No authenticated principal

Media typeapplication/json

A refusal carrying only a human-readable reason.

object
error
required

What went wrong, in the terms the caller can act on.

string

Example generated

{
"error": "example"
}

username names someone other than the signed-in principal

Media typeapplication/json

A refusal carrying only a human-readable reason.

object
error
required

What went wrong, in the terms the caller can act on.

string

Example generated

{
"error": "example"
}

No such run or not yours

Media typeapplication/json

A refusal carrying only a human-readable reason.

object
error
required

What went wrong, in the terms the caller can act on.

string

Example generated

{
"error": "example"
}

Run not awaiting input

Media typeapplication/json

The run was not awaiting input; its actual state travels with the refusal.

object
detail

Why it is in that state, when anything was recorded. Null otherwise.

string
error
required

Always run is not awaiting input; state says what the run is doing instead.

string
state
required

The run’s real state: RUNNING, COMPLETED, KILLED, FAILED, CANCELLED or EXPIRED.

string

Example generated

{
"detail": "example",
"error": "example",
"state": "example"
}