Skip to main content
POST
/
v1
/
runnable
/
{id}
/
runs?mode=async
{
  "id": "<string>"
}
Run a runnable asynchronously. The request will return immediately with a run ID that can be used to check the status and retrieve results. The request may optionally specify a callback_url and callback_headers to be used for the run results. When the run completes, re-factor will perform a POST request to the callback URL with the results or an error message.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Body

application/json
resources
object[]

Resources to embed within the runtime

timeout_seconds
integer
default:0

Timeout in seconds. If null or less than 1, no timeout is set.

telemetry_strategy
enum<string>
default:default

Telemetry strategy to use for the run. disable will disable telemetry, force will force telemetry, and default will use the runnable's default telemetry strategy.

Available options:
disable,
default,
force
callback_url
string<uri>

Callback URL to use for the run. If null, no callback will be executed and run results can be retrieved using the GET /v1/run/{run_id} endpoint. If provided, when the runnable has completed, it will make a POST request to the callback URL with the run results or an error message.

callback_headers
object

Headers to use for the callback request. Only used if callback_url is provided.

Response

202 - application/json

Asynchronous invocation reference

id
string
required

The id of the run. This can be used to query the status of the run or fetch its output.

I