Skip to content

[API] Add Batch Operations Endpoints #77

@fentz26

Description

@fentz26

Problem

No bulk operation support:

  • Creating 100 tasks = 100 API calls
  • Slow and inefficient
  • Network overhead

Proposed Solution

Batch Endpoints

POST /v1/batch
Content-Type: application/json

{
    "operations": [
        {"method": "POST", "path": "/v1/tasks", "body": {...}},
        {"method": "POST", "path": "/v1/tasks", "body": {...}},
        {"method": "DELETE", "path": "/v1/tasks/abc123"}
    ]
}

Response:
{
    "results": [
        {"status": 201, "body": {...}},
        {"status": 201, "body": {...}},
        {"status": 204, "body": null}
    ]
}

Specialized Batch Endpoints

POST /v1/tasks/batch
{
    "tasks": [
        {"title": "Task 1", ...},
        {"title": "Task 2", ...}
    ]
}

DELETE /v1/tasks/batch
{
    "ids": ["abc", "def", "ghi"]
}

Acceptance Criteria

  • Generic batch endpoint
  • Atomic batch option (all or nothing)
  • Per-operation results
  • Max batch size: 100 operations
  • Timeout handling for large batches

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions