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

# Cancel Custom Harness

> Cancel a running custom harness creation workflow.

Uses harness_id to load the harness from S3, then the harness's workflow_id to load the
workflow. If workflow_specific_fields (task_id, session_id) are present, sends cancel to the
agent; otherwise marks the workflow as cancelled so the worker will not overwrite with
success/failure. Requires agent:write permission.



## OpenAPI

````yaml /openapi/api.json post /v1/custom-harnesses/{harness_id}/cancel
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/custom-harnesses/{harness_id}/cancel:
    post:
      tags:
        - Diamond
        - custom-harnesses
      summary: Cancel Custom Harness
      description: >-
        Cancel a running custom harness creation workflow.


        Uses harness_id to load the harness from S3, then the harness's
        workflow_id to load the

        workflow. If workflow_specific_fields (task_id, session_id) are present,
        sends cancel to the

        agent; otherwise marks the workflow as cancelled so the worker will not
        overwrite with

        success/failure. Requires agent:write permission.
      operationId: cancel_custom_harness_v1_custom_harnesses__harness_id__cancel_post
      parameters:
        - name: harness_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Harness Id
        - name: team_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Team ID (required)
            title: Team Id
          description: Team ID (required)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
                title: >-
                  Response Cancel Custom Harness V1 Custom Harnesses  Harness
                  Id  Cancel Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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

````