CopyHero

Get Tasks By Batch Id

GET
/api/v1/tasks/batch/{batch_id}

Get optimized task batch details with job statistics grouped by TaskBlueprintJob. Returns aggregated job counts for each TaskBlueprintJob type within the batch.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

batch_id*Batch Id

Response Body

Successful Response

application/json
  1. response

Detailed view of a task batch with job summaries grouped by TaskBlueprintJob

data*array<>
batch_id*Batch Id
batch_title*Batch Title
batch_title_source*TaskBatchTitleSource

Provenance of a :class:TaskBatch title, in ascending precedence.

Stored as a plain string column (not a DB enum) — mirrors LayoutVersionStatus: this StrEnum is the Python-side source of truth for the allowed values; readers coerce at the read site (TaskBatchTitleSource(row.title_source)). Precedence (manual > ai_final > ai_start > fallback) lives in copyhero_base.service.import_title.resolve_batch_title_write — a lower-precedence source may never overwrite a higher one (exec-plan import-batch-titles, "Title precedence").

Value in"fallback""ai_start""ai_final""manual"
blueprint_name?string|null
blueprint_description?string|null
store_name?string|null
task_count*Task Count
completed_tasks?Completed Tasks
Default0
failed_tasks?Failed Tasks
Default0
running_tasks?Running Tasks
Default0
pending_tasks?Pending Tasks
Default0
cancelled_tasks?Cancelled Tasks
Default0
created_at*Created At
Formatdate-time
updated_at*Updated At
Formatdate-time
first_job_started_at?|null
last_job_finished_at?|null
origin?Origin
Default"manual"
Value in"manual""webhook""monday"
monday_trigger_id?integer|null
monday_trigger_name?string|null
monday_trigger?|null
follow_up_total?Follow Up Total
Default0
follow_up_failed?Follow Up Failed
Default0
follow_up_failure_reasons?
Default{}
Example Request
curl -X GET 'https://app.copyhero.app/api/v1/tasks/batch/0'
Example Response
{  "data": [    {      "blueprint_job_name": "string",      "blueprint_job_description": "string",      "failed_jobs": 0,      "cancelled_jobs": 0,      "finished_jobs": 0,      "pending_jobs": 0,      "running_jobs": 0    }  ],  "batch_id": 0,  "batch_title": "string",  "batch_title_source": "fallback",  "blueprint_name": "string",  "blueprint_description": "string",  "store_name": "string",  "task_count": 0,  "completed_tasks": 0,  "failed_tasks": 0,  "running_tasks": 0,  "pending_tasks": 0,  "cancelled_tasks": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "first_job_started_at": "2019-08-24T14:15:22Z",  "last_job_finished_at": "2019-08-24T14:15:22Z",  "origin": "manual",  "monday_trigger_id": 0,  "monday_trigger_name": "string",  "monday_trigger": {    "id": 0,    "name": "string",    "board_id": "string",    "event_type": "item_created",    "column_id": "string",    "column_value_filter": {},    "platform_filter": "string",    "column_filters": [      {        "column_id": "string",        "operator": "eq",        "value": "string"      }    ],    "field_mapping": {      "property1": {        "mode": "column",        "value": "string"      },      "property2": {        "mode": "column",        "value": "string"      }    },    "deleted_at": "2019-08-24T14:15:22Z",    "item_ids": [      "string"    ],    "triggered_at": "2019-08-24T14:15:22Z",    "viewer_owns_trigger": true  },  "follow_up_total": 0,  "follow_up_failed": 0,  "follow_up_failure_reasons": {}}