---
title: "Api Cancel Data Source Run"
method: POST
path: "/v1/data_source_runs/{application_id}/{run_id}/cancel"
tags: ["data_sources"]
---

# Api Cancel Data Source Run

`POST /v1/data_source_runs/{application_id}/{run_id}/cancel`

## Request

- Base URL: `https://api.branchly.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.branchly.io/v1/data_source_runs/{application_id}/{run_id}/cancel`
- Auth: HTTP bearer

Cancel a running data source run and stop background tasks.

## Path parameters

- `application_id` string, uuid, required
- `run_id` string, uuid, required

## Response `200`

Successful Response

- DataSourceRunAPI
  - `id` string, uuid, required
  - `application_id` string, uuid, required
  - `started_at` string, date-time, required
  - `completed_at` string, date-time, nullable
  - `status` 'started' | 'succeeded' | 'aborted' | 'timeout' | 'cancelled', required
  - `triggered_by` union, required
    - string, email
    - 'system'
    - 'mcp-agent'
    - 'scheduler' | 'webhook'
  - `progress` Progress, required
    - `running` boolean
    - `current_step` integer
    - `steps` ProgressStep[], required
      - `name` 'initiate_datasource_run' | 'fetch_documents' | 'filter_documents' | 'upload_documents', required
      - `description` string: Description of progress step for data source.
      - `metadata` object
      - `started_at` union
        - string
        - string, date-time
      - `completed_at` union
        - string
        - string, date-time
  - `external_id` string, nullable
  - `job_ids` integer[]
  - `data_source_id` string, uuid, required
  - `data_source_type` 'website_crawler' | 'file_upload' | 'node_editor' | 'default_node' | 'openAPI' | 'helpspace' | 'custom_website_crawler' | 'webhook' | 'wordpress', required
  - `data_source_name` string, required
  - `meta` object
  - `vertices_created` unknown[]
    - unknown
  - `vertices_updated` unknown[]
    - unknown
  - `vertices_deleted` string[], nullable
  - `total_vertices_to_create` integer
  - `total_vertices_to_update` integer
  - `total_vertices_to_delete` integer
  - `edges_created` unknown[]
    - unknown
  - `errors` string[]
  - `internal_errors` string[]: Internal errors that should not be shown to the user.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/branchly/apis/branchly-io-api.md) · [All operations](https://skmtc.dev/branchly/apis/branchly-io-api/llms.txt) · [OpenAPI document](https://skmtc.dev/branchly/apis/branchly-io-api/revisions/9ffb024f8ec8?raw)
