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

# Cancel in-progress CVM operation

> Cancel the current in-progress operation for a CVM. Revokes the Celery task and clears the operation lock.



## OpenAPI

````yaml /openapi.json post /api/v1/cvms/{cvm_id}/operations/cancel
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/cvms/{cvm_id}/operations/cancel:
    post:
      tags:
        - CVMs
      summary: Cancel in-progress CVM operation
      description: >-
        Cancel the current in-progress operation for a CVM. Revokes the Celery
        task and clears the operation lock.
      operationId: cancel_cvm_operation_api_v1_cvms__cvm_id__operations_cancel_post
      parameters:
        - name: cvm_id
          in: path
          required: true
          schema:
            type: string
            title: Cvm Id
      responses:
        '200':
          description: Operation cancelled or no operation to cancel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOperationRequest'
        '401':
          description: Authentication required
        '403':
          description: CVM not in workspace
        '404':
          description: CVM not found
        '409':
          description: Cannot cancel this operation type
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CancelOperationRequest:
      properties:
        cancelled:
          type: boolean
          title: Cancelled
          description: Whether an operation was actually cancelled
        correlation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Correlation Id
          description: Correlation ID of the cancelled op
      type: object
      required:
        - cancelled
      title: CancelOperationRequest
      description: Response for cancel operation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````