For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
AI Hub
OverviewApp editorFlow editorAdminAPI & SDK
OverviewApp editorFlow editorAdminAPI & SDK
  • Overview
    • Using the API and SDK
    • Authorization
    • Response statuses
  • API & SDK guides
    • Run automation apps by SDK
  • API reference
      • POSTRun deployment
      • POSTRun app
      • GETGet run status
      • GETGet run results
      • GETList runs
      • DELDelete run
      • Specifying file paths
  • Legacy APIs
    • Job status
    • Run apps
    • Run results
    • Mount
AI Hub
API referenceRuns

Run deployment

POST
https://aihub.instabase.com/api/v2/apps/deployments/:deployment-id/runs
POST
/api/v2/apps/deployments/:deployment-id/runs
$curl "${API_ROOT}/v2/apps/deployments/<DEPLOYMENT-ID>/runs" \
> -H "Authorization: Bearer ${API_TOKEN}" \
> -H "IB-Context: ${IB_CONTEXT}" \
> -H "Content-Type: application/json" \
> -d '{
> "batch_id": <BATCH-ID>,
> }'
202Accepted
1{
2 "id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
3 "status": "RUNNING",
4 "start_timestamp": 1685600000000000000,
5 "finish_timestamp": 0,
6 "msg": "Deployment run has started successfully.",
7 "batch_id": 98765,
8 "input_dir": "acme/MarketingWorkspace/fs/Google Drive/My Drive/input_files/documents/",
9 "app_id": "app-1234abcd-5678-efgh-9012-ijklmnopqrst",
10 "deployment_id": "01902d6f-bb35-74cb-bd27-c09b38bbf20a",
11 "tags": [
12 "monthly-report",
13 "priority-high"
14 ]
15}
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](/automate/deployments#configuring-notifications) 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>
Was this page helpful?
Previous

Run app

Next
Built with

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

Use the UI to optionally configure email notifications or webhooks for certain events within the deployed app’s lifecycle.
Any specified input or output is validated against the context set by the IB-Context header.

Authentication

AuthorizationBearer
Bearer HTTP authentication.

Path parameters

deployment-idstringRequired
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

IB-ContextstringOptional

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

Request

This endpoint expects an object.
batch_idintegerOptional

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_dirstringOptional

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_integrationbooleanOptional

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_timestampdoubleOptional

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_timestampdoubleOptional

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.

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

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.

settingsobjectOptional
JSON object containing settings for the deployment run.

Response

Successfully initiated an asynchronous operation to run the deployment.
idstring
Run ID of the run.
statusenum

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_timestamplong
When the run started, in Unix time nanoseconds.
finish_timestamplong or null

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

msgstring or null
Message about the run.
batch_idinteger or null
The batch ID used as input for this run.
input_dirstring or null
The path of the input folder used for this run.
app_idstring or null
The app ID of the app that was run.
deployment_idstring or null
The deployment ID used for this run.
tagslist of strings or null
List of string tags attached to this run.

The deployment ID.

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