> ## 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.

# Commit Benchmark Task Append

> Validate the batch's staged tasks, publish new tasks, and replace live tasks whose names are stored with different content in one transaction. Task names already stored with identical content are skipped, so committing the same batch twice is a no-op.



## OpenAPI

````yaml /openapi.json post /api/v1/benchmarks/{bench_id}/tasks:append/{batch_id}/commit
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
servers:
  - url: https://api.trajectory.ai
security: []
paths:
  /api/v1/benchmarks/{bench_id}/tasks:append/{batch_id}/commit:
    post:
      tags:
        - benchmarks
      summary: Commit Benchmark Task Append
      description: >-
        Validate the batch's staged tasks, publish new tasks, and replace live
        tasks whose names are stored with different content in one transaction.
        Task names already stored with identical content are skipped, so
        committing the same batch twice is a no-op.
      operationId: commitBenchmarkTaskAppend
      parameters:
        - name: bench_id
          in: path
          required: true
          schema:
            type: string
            title: Bench Id
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
            title: Batch Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkTaskAppendResult'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    BenchmarkTaskAppendResult:
      properties:
        bench_id:
          type: string
          title: Bench Id
        batch_id:
          type: string
          title: Batch Id
        added_count:
          type: integer
          title: Added Count
        updated_count:
          type: integer
          title: Updated Count
        skipped_count:
          type: integer
          title: Skipped Count
        task_count:
          type: integer
          title: Task Count
        failed_tasks:
          items:
            $ref: '#/components/schemas/BenchmarkTaskWriteFailure'
          type: array
          title: Failed Tasks
      type: object
      required:
        - bench_id
        - batch_id
        - added_count
        - updated_count
        - skipped_count
        - task_count
      title: BenchmarkTaskAppendResult
    BenchmarkTaskWriteFailure:
      properties:
        task_id:
          type: string
          title: Task Id
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        error:
          type: string
          title: Error
      type: object
      required:
        - task_id
        - error
      title: BenchmarkTaskWriteFailure
      description: >-
        A task that did not land; its siblings did, so the bench is short
        exactly these.
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          title: Code
          type: string
        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
        - 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

````