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

# Public Delete Runs

> Delete finished runs with everything they own (inputs and outputs, logs,
progress, traces, files no other run references). Select by ``run_ids`` or
by ``filters`` — ``filters.to_date`` deletes runs created before it. Runs
still queued, running or awaiting a human are listed under ``errors`` and
left alone. Usage analytics survive: billing is unaffected. Needs a key
carrying ``resource:delete_history``.



## OpenAPI

````yaml post /v1/runs/bulk/delete
openapi: 3.1.0
info:
  title: Noxus Backend
  description: >-
    Backend API for the Noxus Platform. More information can be found at
    https://docs.noxus.ai
  version: 1.1.0
servers: []
security: []
paths:
  /v1/runs/bulk/delete:
    post:
      tags:
        - V1 - Runs
      summary: Public Delete Runs
      description: >-
        Delete finished runs with everything they own (inputs and outputs, logs,

        progress, traces, files no other run references). Select by ``run_ids``
        or

        by ``filters`` — ``filters.to_date`` deletes runs created before it.
        Runs

        still queued, running or awaiting a human are listed under ``errors``
        and

        left alone. Usage analytics survive: billing is unaffected. Needs a key

        carrying ``resource:delete_history``.
      operationId: public_delete_runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteRunsRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteRunsResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    DeleteRunsRequest:
      properties:
        run_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Run Ids
        filters:
          anyOf:
            - $ref: '#/components/schemas/RunFilters'
            - type: 'null'
        expected_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expected Count
        dry_run:
          type: boolean
          title: Dry Run
          default: false
      type: object
      title: DeleteRunsRequest
      description: |-
        Public run deletion. ``filters.to_date`` is the "older than" knob; only
        finished runs (completed, failed, stopped) are deleted, the rest are
        reported under ``errors``. ``dry_run`` only counts.
    DeleteRunsResult:
      properties:
        succeeded:
          type: integer
          title: Succeeded
        failed:
          type: integer
          title: Failed
        errors:
          additionalProperties:
            type: string
          type: object
          title: Errors
        matched:
          type: integer
          title: Matched
      type: object
      required:
        - succeeded
        - failed
        - errors
        - matched
      title: DeleteRunsResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RunFilters:
      properties:
        from_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: From Date
        to_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: To Date
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        workflow_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workflow Id
        tags:
          anyOf:
            - type: string
            - type: 'null'
          title: Tags
        kb_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Kb Id
      type: object
      title: RunFilters
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````