Run deployment

POST

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

Any specified input or output is validated against the context set by the IB-Context header. For example, if the context is set to your community account, but the batch ID used as input for the run is stored in your organization, the call fails.

Path parameters

deployment-idstringRequired

The deployment ID.

You can 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.

Headers

IB-ContextstringOptional

Specify whether to use your community account or organization account to complete the request. To use your community account, define as your user ID. To use your organization account, define as your organization ID. If unspecified, defaults to community account context. See Authorization and context identification for details.

Request

This endpoint expects an object.
batch_idintegerOptional

Required unless using input_dir. 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_dirintegerOptional

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

versionstringOptional

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

output_workspacestringOptional

The workspace in which to run the app. The output is saved to the default drive of the specified workspace. If not defined, the default is:

  • Community accounts: Runs in and saves to the personal workspace’s Instabase Drive (<USER-ID>/my-repo/Instabase Drive).

  • Organization accounts: Runs in and saves to the organization’s default drive (<ORGANIZATION-ID>/<USER-ID>/<default-drive>).

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 value. See Specifying file paths.

settingsobjectOptional

JSON object containing settings for the app run.

Response

Successfully initiated an asynchronous operation to run the deployment.

idstringOptional

Run ID of the run.

statusenumOptional

Status of the run.

start_timestamplongOptional

When the run started, in Unix time.

finish_timestamplongOptional

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

msgstringOptional

Message about the run.