Skip to content

cancel_import

Cancel an unfinished .btx import transfer returned by import_model() or get_transfer(kind=‘import’). Only the job creator or a workspace owner may cancel, and only while the job is pending or running. Pass workspace_id when the job belongs to another workspace you can access; API tokens stay scoped to their issuing workspace. Completed, cancelled, and inaccessible jobs are not cancelled. Returns job_id, status, message, and the workspace_id resolved for the cancellation.

NameTypeRequiredDefaultDescription
job_idAnnotated[str, Field(description="UUID returned by import_model() or get_transfer(kind='import'). Only pending or running jobs can be cancelled.")]Yes—
workspace_id`Annotated[strNone, Field(description=‘Optional workspace UUID when the import job is outside the current workspace. The caller must be an active member; API tokens remain scoped to their issuing workspace.’)]`NoNone

Returns a structured object. Top-level fields:

  • job_id (string)
  • status (string)
  • message (string)
  • workspace_id (string)

See the response example below for the full payload shape.

{
"name": "cancel_import",
"arguments": {
"job_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
"workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd"
}
}
{
"job_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
"status": "cancelled",
"message": "Import job cancelled.",
"workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd"
}
  • Module: Imports
  • Requires an authenticated Bridge Town session (OAuth) or an API token.