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

# Retry Ingestion



## OpenAPI

````yaml https://api.aiql.io/openapi.json post /ingestions/{id}/retry
openapi: 3.1.0
info:
  title: aiql-api
  version: 0.1.0
servers:
  - url: https://api.aiql.io
security: []
tags:
  - name: Health
    description: Service health checks.
  - name: Workspaces
    description: Workspace management.
  - name: Ingestions
    description: Document ingestion pipeline.
  - name: Queries
    description: Natural-language queries.
  - name: Sources
    description: Ingested sources and their contents.
  - name: Requests
    description: Source addition/removal requests awaiting review.
  - name: Request Changes
    description: Individual source add/remove changes on a request.
  - name: Request Reviews
    description: Reviews of a request, including draft and submit.
  - name: Request Comments
    description: Comments on a request review.
  - name: Canvases
    description: Brainstorm canvases.
  - name: Dashboards
    description: Dashboards.
  - name: Presentations
    description: Slide presentations.
  - name: Tools
    description: Standalone convert/split/shape/extract tools.
  - name: Connectors
    description: Connector catalog and connect flows.
  - name: Connections
    description: Workspace connector connections.
paths:
  /ingestions/{id}/retry:
    post:
      tags:
        - Ingestions
      summary: Retry Ingestion
      operationId: retry_ingestion_ingestions__id__retry_post
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
        - name: AiQL-Workspace
          in: header
          required: true
          schema:
            type: string
            description: ID of the workspace the request operates on.
            title: Aiql-Workspace
          description: ID of the workspace the request operates on.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ingestion'
        '401':
          description: 'Authentication failed: missing or invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST https://api.aiql.io/ingestions/ing_9d2c/retry \
              -H "Authorization: Bearer $AIQL_API_KEY" \
              -H "AiQL-Workspace: $AIQL_WORKSPACE_ID"
        - lang: python
          label: Python SDK
          source: |-
            import os
            from aiql import AiQL

            client = AiQL(api_key=os.environ["AIQL_API_KEY"])

            ingestion = client.ingestions.retry("ing_9d2c")
        - lang: typescript
          label: TypeScript SDK
          source: |-
            import { AiQL } from "@aiql.io/sdk";

            const client = new AiQL({ apiKey: process.env.AIQL_API_KEY });

            const ingestion = await client.ingestions.retry("ing_9d2c");
components:
  schemas:
    Ingestion:
      properties:
        id:
          type: string
          title: Id
        url:
          type: string
          title: Url
        status:
          type: string
          title: Status
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        schema:
          anyOf:
            - $ref: '#/components/schemas/Schema'
            - type: 'null'
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        processing:
          $ref: '#/components/schemas/ProcessingState'
        upload:
          anyOf:
            - $ref: '#/components/schemas/UploadTarget'
            - type: 'null'
      type: object
      required:
        - id
        - url
        - status
        - created_at
        - updated_at
        - processing
      title: Ingestion
    ErrorResponse:
      type: object
      title: ErrorResponse
      properties:
        detail:
          type: string
          title: Detail
      required:
        - detail
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Schema:
      properties:
        classes:
          items:
            $ref: '#/components/schemas/Class'
          type: array
          title: Classes
          description: Classes in the schema.
        relationships:
          items:
            $ref: '#/components/schemas/Relationship'
          type: array
          title: Relationships
          description: Relationships between classes.
        properties:
          items:
            $ref: '#/components/schemas/Property'
          type: array
          title: Properties
          description: Properties of classes.
      type: object
      title: Schema
    ProcessingState:
      properties:
        current_step:
          anyOf:
            - type: string
            - type: 'null'
          title: Current Step
        percent_complete:
          anyOf:
            - type: number
            - type: 'null'
          title: Percent Complete
        steps:
          additionalProperties:
            $ref: '#/components/schemas/StageTimestamps'
          type: object
          title: Steps
        progress:
          additionalProperties:
            $ref: '#/components/schemas/StageProgress'
          type: object
          title: Progress
      type: object
      required:
        - steps
        - progress
      title: ProcessingState
    UploadTarget:
      properties:
        url:
          type: string
          title: Url
        method:
          type: string
          title: Method
          default: PUT
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
        - url
        - expires_at
      title: UploadTarget
    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
    Class:
      properties:
        name:
          type: string
          title: Name
          description: Unique name of the class.
        definition:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition
          description: Natural-language definition of the class.
        cardinality:
          type: string
          enum:
            - one
            - many
          title: Cardinality
          description: >-
            Instance cardinality within a document. 'one' means at most one
            instance per document.
          default: many
      type: object
      required:
        - name
      title: Class
    Relationship:
      properties:
        name:
          type: string
          title: Name
          description: Name of the relationship.
        domain:
          items:
            type: string
          type: array
          title: Domain
          description: Class or classes the relationship starts from.
        range:
          items:
            type: string
          type: array
          title: Range
          description: Class or classes the relationship points to.
        definition:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition
          description: Natural-language definition of the relationship.
      type: object
      required:
        - name
        - domain
        - range
      title: Relationship
    Property:
      properties:
        name:
          type: string
          title: Name
          description: Name of the property.
        type:
          type: string
          title: Type
          description: Data type of the property.
        domain:
          items:
            type: string
          type: array
          title: Domain
          description: Class or classes the property applies to.
        definition:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition
          description: Natural-language definition of the property.
        values:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Values
          description: Enumerated allowed values for the property.
      type: object
      required:
        - name
        - type
        - domain
      title: Property
    StageTimestamps:
      properties:
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        failed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Failed At
      type: object
      title: StageTimestamps
    StageProgress:
      properties:
        completed:
          type: integer
          title: Completed
          default: 0
        total:
          type: integer
          title: Total
          default: 0
        is_approximate:
          type: boolean
          title: Is Approximate
          default: false
        eta_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Eta At
      type: object
      title: StageProgress
  securitySchemes:
    HTTPBearer:
      type: http
      description: API key passed as a Bearer token in the Authorization header.
      scheme: bearer

````