CopyHero

Get Task Batches Paginated

GET
/api/v1/tasks/batch

Get paginated batch summaries with comprehensive filtering.

Filters: - store_ids: Filter by one or more stores (OR within field). Repeated values: ?store_ids=12&store_ids=17 - blueprint_id: Filter by blueprint - batch_id: Filter by specific batch ID - owner_user_id: Runs of the organizations this user owns (superuser only; 403 otherwise) - created_after/before: Date range for batch creation - search_query: Search in blueprint/store names - state_filter: Filter by aggregate state (has_errors, all_complete, in_progress, cancelled) - sort_by: created_at, updated_at, task_count, batch_id - sort_order: asc or desc - skip: Pagination offset - limit: Pagination limit (1-100)

Returns: TaskBatchesOut: Paginated batch summaries with total count

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

search_query?|

Search query string

created_after?|

Filter records created after this datetime

created_before?|

Filter records created before this datetime

updated_after?|

Filter records updated after this datetime

updated_before?|

Filter records updated before this datetime

blueprint_id?|

Filter by blueprint ID

store_ids?array<integer>|

Filter to rows linked to any of the given stores (OR within field). Repeated values: ?store_ids=12&store_ids=17

sort_by?Sort By

Field to sort by

Default"created_at"
sort_order?Sort Order

Sort direction

Default"desc"
Value in"asc""desc"
skip?Skip

Number of records to skip

Range0 <= value
Default0
limit?Limit

Maximum number of records to return

Range1 <= value <= 1000
Default100
batch_id?|

Filter by batch ID

owner_user_id?|

Filter by the user who owns the run's organization (superuser only)

state_filter?|

Filter by aggregate state (has_errors, all_complete, in_progress, cancelled)

Response Body

Successful Response

application/json
  1. response
data*array<>
count*Count
Example Request
curl -X GET 'https://app.copyhero.app/api/v1/tasks/batch'
Example Response
{  "data": [    {      "batch_id": 0,      "batch_title": "string",      "batch_title_source": "fallback",      "task_count": 0,      "total_jobs": 0,      "pending_jobs": 0,      "running_jobs": 0,      "completed_jobs": 0,      "failed_jobs": 0,      "cancelled_jobs": 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",      "owner_id": 0,      "owner_full_name": "string",      "owner_email": "string",      "started_by_full_name": "string",      "started_by_email": "string",      "organization_name": "string",      "store_owner_full_name": "string",      "store_owner_email": "string",      "store_ids": [        0      ],      "blueprint_id": 0,      "blueprint_name": "string",      "store_name": "string",      "origin": "manual",      "monday_trigger_name": "string",      "follow_up_total": 0,      "follow_up_failed": 0,      "follow_up_failure_reason": "string"    }  ],  "count": 0}