Skip to main content

Execute a Bot by id

Execute a stored Bot by its FHIR ID. The request body supplies the Bot's input; its code determines the output, so the response can vary between Bots.

MethodPath
POST/fhir/R4/Bot/:id/$execute

Request​

curl --request POST \
--url "https://api.sandbox.ovok.com/fhir/R4/Bot/${BOT_ID}/\$execute" \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{"input":"example"}'
Request partDescription
:idID of the Bot resource to execute.
BodyJSON input consumed by the Bot. The required shape is defined by the Bot implementation.

Response​

The response body and content type are defined by the Bot's result. An asynchronous invocation may return 202 Accepted and a job location when requested with Prefer: respond-async.

OutcomeDescription
Synchronous resultThe Bot's output is returned by the operation.
Asynchronous resultFollow the job URL supplied in the response to retrieve completion status.
Execution errorThe response describes the runtime or input failure; details depend on the Bot.