---
title: "Ask an activation to stop at the next chunk boundary."
method: POST
path: "/otel/cloud-telemetry/bulk-jobs/{batch_id}/cancel"
tags: ["OTel"]
---

# Ask an activation to stop at the next chunk boundary.

`POST /otel/cloud-telemetry/bulk-jobs/{batch_id}/cancel`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/otel/cloud-telemetry/bulk-jobs/{batch_id}/cancel`
- Auth: HTTP bearer

## Path parameters

- `batch_id` string, required

## Response `200`

The cancellation was recorded, or the job had already stopped

- BulkActivationJobResponse: A job, its projects, its progress and its ETA.
  - `abort_detail` string, nullable: The same reason as a sentence naming the fix and the page that applies it.
  - `abort_reason` string, nullable: Machine-readable instance-wide abort reason, e.g. `not_linked`.
  - `batch_id` string, required
  - `bytes_shipped` integer, required
  - `cancel_requested` boolean, required: Set as soon as a cancel is requested, before the worker honours it at the next chunk boundary — so the UI can stop offering Cancel twice.
  - `cancel_requested_at` string, date-time, nullable
  - `completed_at` string, date-time, nullable
  - `created_at` string, date-time, required
  - `current_project_id` integer, nullable: The project being switched or backfilled right now.
  - `estimated_bytes` integer, required
  - `estimated_spans` integer, required
  - `eta_seconds` integer, nullable: Seconds remaining, or `null` when `eta_state` is not `known`.
  - `eta_state` 'estimating' | 'known' | 'finished', required: How much of the ETA this instance can honestly claim to know.
  - `observed_spans_per_sec` number, double, nullable: The average this job has actually achieved since it started. Sent so the client can render a coarse rate instead of implying a precision the average does not have.
  - `percent_complete` number, double, nullable
  - `plan_hash` string, nullable
  - `projects` BulkActivationJobProjectResponse[], required
    - `bytes_shipped` integer, required
    - `completed_at` string, date-time, nullable
    - `estimated_bytes` integer, required
    - `estimated_spans` integer, required
    - `last_error` string, nullable: Why this project stopped, when `status` is `failed`. The switch is never rolled back, so this project is Cloud-primary with a recorded hole in its history — which is retryable, and must be visible to be retried.
    - `percent_complete` number, double, nullable: `spans_shipped / estimated_spans`, clamped to 0–100. `None` when the estimate is zero or unknown — an empty window is not "0% done".
    - `project_id` integer, required
    - `setup_path` string, nullable
    - `skip_detail` string, nullable
    - `skip_reason` string, nullable
    - `spans_shipped` integer, required
    - `started_at` string, date-time, nullable
    - `status` 'pending' | 'switching' | 'backfilling' | 'done' | 'failed' | 'skipped', required: Where one project has got to inside a bulk job. `switching` and `backfilling` are separate on purpose: the switch is cheap, atomic and egresses nothing, while the backfill can run for hours and costs money. An operator watching a stuck job needs to know which of the two it is stuck in, and a project that failed after switching is *not* rolled back (ADR-042 §7) — so the two must be distinguishable after the fact too.
    - `window_from` string, date-time, required
    - `window_to` string, date-time, required
  - `projects_done` integer, required
  - `projects_failed` integer, required
  - `projects_pending` integer, required
  - `projects_skipped` integer, required
  - `projects_total` integer, required
  - `requested_by_user_id` integer, nullable
  - `spans_shipped` integer, required
  - `started_at` string, date-time, nullable
  - `status` 'pending' | 'running' | 'completed' | 'completed_with_failures' | 'aborted' | 'cancelled', required: Lifecycle of a bulk job. The three terminal-with-a-problem states are deliberately distinct. `completed_with_failures` means the job ran to the end and some projects did not; `aborted` means an instance-wide condition stopped it and the untouched projects are still `pending`, ready to resume; `cancelled` means an operator asked it to stop. Collapsing any two of those would leave the Console unable to say what to do next.
  - `trigger` 'purchase' | 'operator', required: Which entry point created the job (ADR-042 §1). The engine does not branch on this. It exists so an operator disputing an invoice, or reading an audit trail, can tell "this instance spent money because someone clicked a button" apart from "…because a purchase completed and the payment was the authorization".

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: No such activation job
- `500`: Internal server error

## Changes

- **2026-11-09** `12896146b193`: 4 breaking
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `404` status
  - removed the required property `extensions` from the response with the `500` status
- **2026-10-05** `4b228ebed583`: 4 info
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
  - added the optional property `status` to the response with the `404` status
  - added the optional property `status` to the response with the `500` status
- **2026-10-05** `63a80791dc58`: 4 warning
  - removed the optional property `status` from the response with the `401` status
  - removed the optional property `status` from the response with the `403` status
  - removed the optional property `status` from the response with the `404` status
  - removed the optional property `status` from the response with the `500` status
- **2026-09-23** `f4efc4d5c7b7`: 4 info
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
  - added the optional property `status` to the response with the `404` status
  - added the optional property `status` to the response with the `500` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/otel/cloud-telemetry/bulk-jobs/:batch_id/cancel/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
