{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/coactive/main/json-schema/coactive-ingestion-create-ingest-job-from-bucket-request-schema.json",
  "title": "CreateIngestJobFromBucketRequest",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coactive-ingestion-ingest-api-openapi.yml#/components/schemas/ingestion_CreateIngestJobFromBucketRequest",
  "type": "object",
  "properties": {
    "dataset_id": {
      "type": "string",
      "format": "uuid"
    },
    "connection_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "path": {
      "type": [
        "string",
        "null"
      ]
    },
    "spec": {
      "oneOf": [
        {
          "$ref": "#/$defs/ingestion_BucketSpec"
        },
        {
          "type": "null"
        }
      ]
    },
    "source_path": {
      "type": [
        "string",
        "null"
      ]
    },
    "source_spec": {
      "oneOf": [
        {
          "$ref": "#/$defs/ingestion_BucketSpec"
        },
        {
          "type": "null"
        }
      ]
    },
    "max_depth": {
      "type": "integer",
      "default": 0,
      "description": "Max depth of recursion under a prefix"
    }
  },
  "required": [
    "dataset_id"
  ],
  "$defs": {
    "ingestion_BucketSpec": {
      "type": "object",
      "properties": {
        "bucket": {
          "type": "string"
        },
        "prefix": {
          "type": "string",
          "default": "/"
        },
        "provider": {
          "$ref": "#/$defs/ingestion_ExternalCloudStorageProvider"
        }
      },
      "required": [
        "bucket"
      ],
      "title": "BucketSpec"
    },
    "ingestion_ExternalCloudStorageProvider": {
      "type": "string",
      "enum": [
        "aws"
      ],
      "title": "ExternalCloudStorageProvider"
    }
  }
}