v2

latestOpenAPI 3.1.02026-08-06276982.8 KB
runs

Run deployment

Run an AI Hub deployment by its deployment ID. The input for the run is specified using a batch ID or file path.

<Info>Use the UI to optionally configure email notifications or webhooks for certain events within the deployed app's lifecycle.</Info>

<Note>Any specified input or output is validated against the context set by the IB-Context header.</Note>

post/v2/apps/deployments/{deployment-id}/runs

Path parameters

deployment-idstring required

The deployment ID.

<Tip>Find the deployment ID by opening the deployment in AI Hub and looking at the site URL, such as https<span>://</span>aihub.instabase.com/deployments/01902d6f-bb35-74cb-bd27-c09b38bbf20a/runs.</Tip>

Headers

Authorizationstring required

Bearer HTTP authentication.

IB-Contextstring

Typically your organization ID. See Authorization and context identification for details.

Request body

batch_idinteger

Required unless using input_dir or manual_upstream_integration. The batch ID of a batch created with the Batches endpoint. All files uploaded to the batch are used as input for the run.

input_dirstring

Required unless using batch_id or manual_upstream_integration. The path of the input folder in a connected drive or Instabase Drive. See Specifying file paths.

manual_upstream_integrationboolean

Use the deployment's upstream integration as a source rather than a batch_id or input_dir. Requires an upstream integration to be configured for the deployment.

from_timestampnumber double

Required if manual_upstream_integration is true and the upstream integration is a mailbox integration. Specifies the earliest date in Unix time milliseconds from which to pull emails.

to_timestampnumber double

Required if manual_upstream_integration is true and the upstream integration is a mailbox integration. Specifies the latest date in Unix time milliseconds from which to pull emails.

versionstring

Version of the app to use. If not specified, defaults to the latest production version.

output_dirstring

Defines a specific location for the output to be saved in a connected drive or Instabase Drive. If defined, overrides the output workspace configured for the deployment. See Specifying file paths.

Response

Successfully initiated an asynchronous operation to run the deployment.

idstring

Run ID of the run.

status'CANCELLED' | 'COMPLETE' | 'FAILED' | 'PAUSED' | 'RUNNING' | 'STOPPED_AT_CHECKPOINT'

Status of the run. Possible values and meanings:

  • CANCELLED -- A user cancelled the run
  • COMPLETE -- The run successfully completed. A human review completed if it was required. Results are retrievable, but some fields may have failed and have the value ERROR.
  • FAILED -- The run failed to complete
  • PAUSED -- This status is reserved for future use
  • RUNNING -- The run is in progress and is not paused
  • STOPPED_AT_CHECKPOINT -- A validation error has paused the run for human review
start_timestampinteger

When the run started, in Unix time nanoseconds.

finish_timestampinteger nullable

When the run finished, in Unix time nanoseconds. null if run is still in progress.

msgstring nullable

Message about the run.

batch_idinteger nullable

The batch ID used as input for this run.

input_dirstring nullable

The path of the input folder used for this run.

app_idstring nullable

The app ID of the app that was run.

deployment_idstring nullable

The deployment ID used for this run.

tagsstring[] nullable

List of string tags attached to this run.