---
title: "Batch Operations"
method: POST
path: "/tasks/batch-ops"
tags: ["batch-operations"]
---

# Batch Operations

`POST /tasks/batch-ops`

## Request

- Base URL: `http://127.0.0.1:8052`
- URL: `http://127.0.0.1:8052/tasks/batch-ops`
- Auth: none declared

Execute a batch operation on multiple tasks.

Supported actions:
- **cancel**: Cancel all specified tasks.
- **retry**: Reset failed tasks back to open.
- **reprioritize**: Update priority on all specified tasks (requires ``priority``).
- **tag**: Add tags to all specified tasks (requires ``tags``).

Returns a result with lists of succeeded and failed task IDs.

## Request body

- BatchRequest: Request body for POST /tasks/batch-ops.
  - `action` 'cancel' | 'retry' | 'reprioritize' | 'tag', required: Supported batch operation types.
  - `ids` string[], required
  - `priority` integer, nullable
  - `tags` string[], nullable

## Response `200`

Successful Response

- BatchResult: Response body for POST /tasks/batch-ops.
  - `succeeded` string[]
  - `failed` object

## Other responses

- `422`: Invalid batch request

---

[API](https://skmtc.dev/bernstein/apis/bernstein-task-server.md) · [All operations](https://skmtc.dev/bernstein/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc.dev/bernstein/apis/bernstein-task-server/revisions/2a20a34ad2eb?raw)
