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

# Cancel a spec (benchmark) upload

> Cancel an uploading session; finalized submissions cannot be cancelled.



## OpenAPI

````yaml /openapi.json post /api/v1/benchmark-ingestion/sessions/{operation_id}/cancel
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
  x-trajectory-api-version: '2026-10-14'
  description: >-
    This contract is API version 2026-10-14. The optional Trajectory-API-Version
    header pins it, and tmp-contract is accepted as an alias. Requests without
    the header get this version. Version 2026-10-07 and the pre-launch legacy
    response formats are retired.
servers:
  - url: https://api.trajectory.ai
security: []
tags:
  - name: agents
    x-group: Agents
  - name: benchmarks
    x-group: Specs (benchmarks)
  - name: diagnostics
    x-group: Diagnostics
  - name: benchmark-ingestion
    x-group: Spec (benchmark) submissions
  - name: eval
    x-group: Evaluations
  - name: training
    x-group: Training
  - name: deployments
    x-group: Deployments
  - name: model-endpoints
    x-group: Model endpoints
  - name: inference
    x-group: Inference
  - name: trajectories
    x-group: Trajectories
  - name: artifacts
    x-group: Artifacts
  - name: telemetry
    x-group: Telemetry
  - name: supported-models
    x-group: Supported models
  - name: organizations
    x-group: Organizations
  - name: secrets
    x-group: Secrets
paths:
  /api/v1/benchmark-ingestion/sessions/{operation_id}/cancel:
    post:
      tags:
        - benchmark-ingestion
      summary: Cancel a spec (benchmark) upload
      description: Cancel an uploading session; finalized submissions cannot be cancelled.
      operationId: cancelBenchmarkSubmissionSession
      parameters:
        - name: operation_id
          in: path
          required: true
          schema:
            type: string
            title: Operation Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkIngestionOperationStatus'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    BenchmarkIngestionOperationStatus:
      properties:
        operation_id:
          type: string
          title: Operation Id
        bench_id:
          type: string
          title: Bench Id
        status:
          type: string
          enum:
            - uploading
            - queued
            - running
            - cancelled
            - succeeded
            - partial_failure
            - failed
          title: Status
        stage:
          type: string
          enum:
            - verifying
            - registering
            - building
          title: Stage
        attempt:
          type: integer
          minimum: 0
          title: Attempt
        max_attempts:
          type: integer
          minimum: 1
          title: Max Attempts
        last_error:
          anyOf:
            - $ref: '#/components/schemas/BenchmarkIngestionFailure'
            - type: 'null'
        task_count:
          type: integer
          title: Task Count
          default: 0
        added_count:
          type: integer
          title: Added Count
          default: 0
        updated_count:
          type: integer
          title: Updated Count
          default: 0
        skipped_count:
          type: integer
          title: Skipped Count
          default: 0
        registered_tasks:
          type: integer
          title: Registered Tasks
          default: 0
        total_tasks:
          type: integer
          title: Total Tasks
          default: 0
        ready_runtimes:
          type: integer
          title: Ready Runtimes
          default: 0
        total_runtimes:
          type: integer
          title: Total Runtimes
          default: 0
        failure_count:
          type: integer
          title: Failure Count
          default: 0
        build_images:
          type: boolean
          title: Build Images
        ready:
          type: boolean
          title: Ready
          default: false
      type: object
      required:
        - operation_id
        - bench_id
        - status
        - stage
        - attempt
        - max_attempts
        - build_images
      title: BenchmarkIngestionOperationStatus
    BenchmarkIngestionFailure:
      properties:
        stage:
          type: string
          enum:
            - verifying
            - registering
            - building
          title: Stage
        resource_type:
          type: string
          enum:
            - submission
            - upload
            - task
            - runtime
          title: Resource Type
        resource_id:
          type: string
          title: Resource Id
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        retryable:
          type: boolean
          title: Retryable
        provider_status_code:
          anyOf:
            - type: integer
              maximum: 599
              minimum: 100
            - type: 'null'
          title: Provider Status Code
        affected_tasks_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Affected Tasks Cursor
        resolved:
          type: boolean
          title: Resolved
          default: false
      type: object
      required:
        - stage
        - resource_type
        - resource_id
        - code
        - message
        - retryable
      title: BenchmarkIngestionFailure
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - billing_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.