> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Operation

> Cancel an active Table sheet recalculation operation. Requests are scoped to the workspace associated with the API key; table, sheet, column, cell, operation, and version IDs must belong to that workspace.

Cancel an active recalculation operation for a sheet.

If no active execution exists for the provided `operation_id`, the endpoint returns success with zero cancelled cells.


## OpenAPI

````yaml DELETE /api/public/v2/tables/{table_id}/sheets/{sheet_id}/operations/{operation_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/public/v2/tables/{table_id}/sheets/{sheet_id}/operations/{operation_id}:
    delete:
      tags:
        - tables
      summary: Cancel Table Sheet Operation
      description: >-
        Cancel an active Table sheet recalculation operation. Requests are
        scoped to the workspace associated with the API key; table, sheet,
        column, cell, operation, and version IDs must belong to that workspace.
      operationId: cancelTableSheetOperation
      parameters:
        - name: X-API-KEY
          in: header
          required: true
          schema:
            type: string
          description: >-
            Your PromptLayer API key. The key's workspace scopes table resources
            for this request.
        - name: table_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Table ID.
        - name: sheet_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Table sheet ID.
        - name: operation_id
          in: path
          required: true
          schema:
            type: string
          description: Operation ID.
      responses:
        '200':
          description: Operation cancelled or no active operation found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelTableSheetOperationResponse'
        '400':
          description: Invalid workspace context.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Table or sheet not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CancelTableSheetOperationResponse:
      type: object
      title: CancelTableSheetOperationResponse
      required:
        - success
        - message
        - operation_id
        - execution_ids
        - cancelled_cell_count
      properties:
        success:
          type: boolean
        message:
          type: string
        operation_id:
          type: string
        execution_ids:
          type: array
          items:
            type: string
        cancelled_cell_count:
          type: integer
        not_started_reset_count:
          type: integer
        running_invalidated_count:
          type: integer
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
          description: Indicates that the request failed.
        message:
          type: string
          description: Human-readable error message.
        error:
          type: string
          description: Machine-readable or fallback error message.
      additionalProperties: true
      description: >-
        Standard error response. Some legacy endpoints may return either message
        or error.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````