Coactive ingestion > ingest API

The ingestion > ingest API from Coactive — 6 operation(s) for ingestion > ingest.

OpenAPI Specification

coactive-ingestion-ingest-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference agentic-search > agenticSearch ingestion > ingest API
  version: 1.0.0
servers:
- url: https://api.coactive.ai
  description: Production
- url: https://app.coactive.ai
  description: Production
tags:
- name: ingestion > ingest
paths:
  /api/v1/ingestion/metadata:
    post:
      operationId: create-ingest-job-for-metadata-api-v-1-ingestion-metadata-post
      summary: Add/Update Metadata
      description: Update metadata for ingested assets
      tags:
      - ingestion > ingest
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:CreateIngestJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ingestion:CreateIngestJobForMetadataRequest'
  /api/v1/ingestion/assets:
    post:
      operationId: create-ingest-job-from-assets-api-v-1-ingestion-assets-post
      summary: Create Ingest Job From Assets
      description: Ingest assets directly, using a batch/list specification
      tags:
      - ingestion > ingest
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:CreateIngestJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ingestion:CreateIngestJobFromAssetsRequest'
  /api/v1/ingestion/buckets:
    post:
      operationId: create-ingest-job-from-bucket-api-v-1-ingestion-buckets-post
      summary: Create Ingest Job From Bucket
      description: Ingest assets from a bucket scan
      tags:
      - ingestion > ingest
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:CreateIngestJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ingestion:CreateIngestJobFromBucketRequest'
  /api/v1/ingestion/files:
    post:
      operationId: create-ingest-job-from-file-api-v-1-ingestion-files-post
      summary: Create Ingest Job From File
      description: Ingest assets from a CSV or JSON file
      tags:
      - ingestion > ingest
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:CreateIngestJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ingestion:CreateIngestJobFromFileRequest'
  /api/v1/ingestion/images:
    post:
      operationId: create-ingest-job-from-images-api-v-1-ingestion-images-post
      summary: Create Ingest Job From Images
      description: Ingest assets directly, using a batch/list specification
      tags:
      - ingestion > ingest
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:CreateIngestJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ingestion:CreateIngestJobFromImagesRequest'
  /api/v1/ingestion/videos:
    post:
      operationId: create-ingest-job-from-videos-api-v-1-ingestion-videos-post
      summary: Create Ingest Job From Videos
      description: Ingest assets directly, using a batch/list specification
      tags:
      - ingestion > ingest
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:CreateIngestJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ingestion:HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ingestion:CreateIngestJobFromVideosRequest'
components:
  schemas:
    ingestion:ValidationErrorLocItems:
      oneOf:
      - type: string
      - type: integer
      title: ValidationErrorLocItems
    ingestion:ExternalCloudStorageProvider:
      type: string
      enum:
      - aws
      title: ExternalCloudStorageProvider
    ingestion:CreateIngestJobFromImagesRequest:
      type: object
      properties:
        dataset_id:
          type: string
          format: uuid
        connection_name:
          type:
          - string
          - 'null'
        images:
          type: array
          items:
            $ref: '#/components/schemas/ingestion:IngestJobImage'
      required:
      - dataset_id
      - images
      title: CreateIngestJobFromImagesRequest
    ingestion:InternalAssetMetadataUpdateMetadata:
      oneOf:
      - type: boolean
      - type: integer
      - type: number
        format: double
      - type: string
      - type: string
        format: date-time
      title: InternalAssetMetadataUpdateMetadata
    ingestion:CreateIngestJobResponse:
      type: object
      properties:
        id:
          type: string
        org_id:
          type: string
        dataset_id:
          type: string
          format: uuid
        connection_name:
          type:
          - string
          - 'null'
        job_type:
          $ref: '#/components/schemas/ingestion:IngestJobType'
        details:
          oneOf:
          - $ref: '#/components/schemas/ingestion:CreateIngestJobResponseDetails'
          - type: 'null'
        request_type:
          $ref: '#/components/schemas/ingestion:RequestType'
        status:
          $ref: '#/components/schemas/ingestion:IngestJobStatusEnum'
        created_dt:
          type: string
          format: date-time
        updated_dt:
          type:
          - string
          - 'null'
          format: date-time
        total_assets:
          type:
          - integer
          - 'null'
        processed_assets:
          type: integer
          default: 0
        errored_assets:
          type: integer
          default: 0
        request_id:
          type:
          - string
          - 'null'
      required:
      - id
      - org_id
      - dataset_id
      - job_type
      - details
      - created_dt
      title: CreateIngestJobResponse
    ingestion:CreateIngestJobFromVideosRequest:
      type: object
      properties:
        dataset_id:
          type: string
          format: uuid
        connection_name:
          type:
          - string
          - 'null'
        videos:
          type: array
          items:
            $ref: '#/components/schemas/ingestion:IngestJobVideo'
      required:
      - dataset_id
      - videos
      title: CreateIngestJobFromVideosRequest
    ingestion:IngestJobImageMetadata:
      oneOf:
      - type: boolean
      - type: integer
      - type: number
        format: double
      - type: string
      - type: string
        format: date-time
      title: IngestJobImageMetadata
    ingestion:CreateIngestJobFromFileRequest:
      type: object
      properties:
        dataset_id:
          type: string
          format: uuid
        source_path:
          type: string
        connection_name:
          type:
          - string
          - 'null'
        file_type:
          $ref: '#/components/schemas/ingestion:ExternalFileType'
      required:
      - dataset_id
      - source_path
      title: CreateIngestJobFromFileRequest
    ingestion:BucketJobDetails:
      type: object
      properties:
        path:
          type: string
        spec:
          $ref: '#/components/schemas/ingestion:BucketSpec'
        max_depth:
          type: integer
          default: 0
      required:
      - path
      - spec
      title: BucketJobDetails
    ingestion:CreateIngestJobResponseDetails:
      oneOf:
      - $ref: '#/components/schemas/ingestion:AssetsJobDetails'
      - $ref: '#/components/schemas/ingestion:FileJobDetails'
      - $ref: '#/components/schemas/ingestion:BucketJobDetails'
      - $ref: '#/components/schemas/ingestion:MetadataUpdateJobDetails'
      title: CreateIngestJobResponseDetails
    ingestion:IngestJobImage:
      type: object
      properties:
        source_path:
          type: string
        metadata:
          type:
          - object
          - 'null'
          additionalProperties:
            $ref: '#/components/schemas/ingestion:IngestJobImageMetadata'
      required:
      - source_path
      title: IngestJobImage
    ingestion:ExternalAssetType:
      type: string
      enum:
      - unspecified
      - image
      - video
      title: ExternalAssetType
    ingestion:ExplicitExternalAssetType:
      type: string
      enum:
      - image
      - video
      title: ExplicitExternalAssetType
    ingestion:IngestJobStatusEnum:
      type: string
      enum:
      - completed
      - failed
      - in_progress
      - pending
      - paused
      - stopping
      - stopped
      description: Enum of Ingest Job Status.
      title: IngestJobStatusEnum
    ingestion:IngestJobVideo:
      type: object
      properties:
        source_path:
          type: string
        metadata:
          type:
          - object
          - 'null'
          additionalProperties:
            $ref: '#/components/schemas/ingestion:IngestJobVideoMetadata'
      required:
      - source_path
      title: IngestJobVideo
    ingestion:InternalAssetMetadataUpdate:
      type: object
      properties:
        asset_id:
          type: string
          format: uuid
        source_path:
          type:
          - string
          - 'null'
        asset_type:
          $ref: '#/components/schemas/ingestion:ExplicitExternalAssetType'
        metadata:
          type:
          - object
          - 'null'
          additionalProperties:
            $ref: '#/components/schemas/ingestion:InternalAssetMetadataUpdateMetadata'
      required:
      - asset_id
      - source_path
      - asset_type
      title: InternalAssetMetadataUpdate
    ingestion:AssetJobDetail:
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/ingestion:IngestJobAsset'
        asset_id:
          type:
          - string
          - 'null'
          format: uuid
        error:
          type:
          - string
          - 'null'
      required:
      - asset
      title: AssetJobDetail
    ingestion:IngestJobType:
      type: string
      enum:
      - unspecified
      - assets
      - file
      - bucket
      - metadata
      title: IngestJobType
    ingestion:ExistingAssetMetadataUpdate:
      type: object
      properties:
        asset_id:
          type:
          - string
          - 'null'
          format: uuid
        source_path:
          type:
          - string
          - 'null'
        asset_type:
          $ref: '#/components/schemas/ingestion:ExplicitExternalAssetType'
        metadata:
          type:
          - object
          - 'null'
          additionalProperties:
            $ref: '#/components/schemas/ingestion:ExistingAssetMetadataUpdateMetadata'
      required:
      - asset_type
      title: ExistingAssetMetadataUpdate
    ingestion:BucketSpec:
      type: object
      properties:
        bucket:
          type: string
        prefix:
          type: string
          default: /
        provider:
          $ref: '#/components/schemas/ingestion:ExternalCloudStorageProvider'
      required:
      - bucket
      title: BucketSpec
    ingestion:MetadataUpdateJobDetails:
      type: object
      properties:
        accepted:
          type: array
          items:
            $ref: '#/components/schemas/ingestion:InternalAssetMetadataUpdate'
        invalid_assets:
          type: array
          items:
            $ref: '#/components/schemas/ingestion:ExistingAssetMetadataUpdate'
      required:
      - accepted
      - invalid_assets
      title: MetadataUpdateJobDetails
    ingestion:ExistingAssetMetadataUpdateMetadata:
      oneOf:
      - type: boolean
      - type: integer
      - type: number
        format: double
      - type: string
      - type: string
        format: date-time
      title: ExistingAssetMetadataUpdateMetadata
    ingestion:AssetsJobDetails:
      type: object
      properties:
        assets:
          type: array
          items:
            $ref: '#/components/schemas/ingestion:AssetJobDetail'
      required:
      - assets
      title: AssetsJobDetails
    ingestion:CreateIngestJobFromBucketRequest:
      type: object
      properties:
        dataset_id:
          type: string
          format: uuid
        connection_name:
          type:
          - string
          - 'null'
        path:
          type:
          - string
          - 'null'
        spec:
          oneOf:
          - $ref: '#/components/schemas/ingestion:BucketSpec'
          - type: 'null'
        source_path:
          type:
          - string
          - 'null'
        source_spec:
          oneOf:
          - $ref: '#/components/schemas/ingestion:BucketSpec'
          - type: 'null'
        max_depth:
          type: integer
          default: 0
          description: Max depth of recursion under a prefix
      required:
      - dataset_id
      title: CreateIngestJobFromBucketRequest
    ingestion:RequestType:
      type: string
      enum:
      - submit
      title: RequestType
    ingestion:CreateIngestJobForMetadataRequest:
      type: object
      properties:
        dataset_id:
          type: string
          format: uuid
        update_assets:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ingestion:ExistingAssetMetadataUpdate'
        source_path:
          type:
          - string
          - 'null'
        update_type:
          $ref: '#/components/schemas/ingestion:MetadataUpdateType'
      required:
      - dataset_id
      title: CreateIngestJobForMetadataRequest
    ingestion:IngestJobAssetMetadata:
      oneOf:
      - type: boolean
      - type: integer
      - type: number
        format: double
      - type: string
      - type: string
        format: date-time
      title: IngestJobAssetMetadata
    ingestion:ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ingestion:ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ingestion:MetadataUpdateType:
      type: string
      enum:
      - overwrite
      - upsert
      - remove
      title: MetadataUpdateType
    ingestion:CreateIngestJobFromAssetsRequest:
      type: object
      properties:
        dataset_id:
          type: string
          format: uuid
        connection_name:
          type:
          - string
          - 'null'
        assets:
          type: array
          items:
            $ref: '#/components/schemas/ingestion:IngestJobAsset'
      required:
      - dataset_id
      - assets
      title: CreateIngestJobFromAssetsRequest
    ingestion:FileJobDetails:
      type: object
      properties:
        file:
          $ref: '#/components/schemas/ingestion:CreateIngestJobFromFileRequest'
      required:
      - file
      title: FileJobDetails
    ingestion:IngestJobVideoMetadata:
      oneOf:
      - type: boolean
      - type: integer
      - type: number
        format: double
      - type: string
      - type: string
        format: date-time
      title: IngestJobVideoMetadata
    ingestion:HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ingestion:ValidationError'
      title: HTTPValidationError
    ingestion:ExternalFileType:
      type: string
      enum:
      - unspecified
      - csv
      - json
      title: ExternalFileType
    ingestion:IngestJobAsset:
      type: object
      properties:
        source_path:
          type: string
        metadata:
          type:
          - object
          - 'null'
          additionalProperties:
            $ref: '#/components/schemas/ingestion:IngestJobAssetMetadata'
        asset_type:
          $ref: '#/components/schemas/ingestion:ExternalAssetType'
      required:
      - source_path
      title: IngestJobAsset
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer