{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-intake-response-schema.json",
  "title": "intakeResponse",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-intake-openapi.yml#/components/schemas/intakeResponse",
  "properties": {
    "catalog": {
      "$ref": "#/$defs/intakeCatalog"
    },
    "create_time": {
      "description": "The point in time the resource was created.",
      "format": "date-time",
      "type": "string"
    },
    "deadLetterTopic": {
      "description": "The topic where undelivered messages are published (Dead Letter Queue).",
      "maxLength": 1024,
      "type": "string"
    },
    "description": {
      "description": "The description is a longer text chosen by the user to provide more context for the resource.",
      "maxLength": 1024,
      "type": "string"
    },
    "displayName": {
      "description": "The display name is a short name chosen by the user to identify the resource.",
      "maxLength": 32,
      "minLength": 1,
      "type": "string"
    },
    "failure_message": {
      "description": "A human-readable description of the error, if the state is 'failed'.",
      "type": "string"
    },
    "id": {
      "description": "A auto generated unique id which identifies the resource.",
      "format": "uuid",
      "type": "string"
    },
    "intakeRunnerId": {
      "description": "The unique id of the intake runner this intake is running on.",
      "format": "uuid",
      "type": "string"
    },
    "labels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Labels are a set of key-value pairs assigned to resources.",
      "type": [
        "object",
        "null"
      ]
    },
    "state": {
      "description": "The current state of the resource.",
      "enum": [
        "reconciling",
        "active",
        "deleting",
        "failed"
      ],
      "type": "string"
    },
    "topic": {
      "description": "The topic to publish data to.",
      "maxLength": 1024,
      "type": "string"
    },
    "undeliveredMessageCount": {
      "description": "Number of messages that failed delivery and were sent to the Dead Letter Queue.",
      "format": "int64",
      "type": "integer"
    },
    "uri": {
      "description": "The URI for reaching the resource.",
      "maxLength": 1024,
      "type": "string"
    }
  },
  "required": [
    "id",
    "displayName",
    "state",
    "create_time",
    "intakeRunnerId",
    "uri",
    "topic",
    "catalog",
    "deadLetterTopic"
  ],
  "$defs": {
    "catalogAuth": {
      "description": "Configures authentication for the Iceberg catalog",
      "properties": {
        "dremio": {
          "$ref": "#/$defs/dremioAuth"
        },
        "type": {
          "$ref": "#/$defs/catalogAuthType"
        }
      },
      "required": [
        "type"
      ]
    },
    "catalogAuthType": {
      "description": "Means of authentication for catalog requests",
      "enum": [
        "none",
        "dremio"
      ],
      "type": "string"
    },
    "dremioAuth": {
      "properties": {
        "personalAccessToken": {
          "description": "A Dremio personal access token for authentication",
          "maxLength": 1024,
          "type": "string"
        },
        "tokenEndpoint": {
          "description": "The URL to the Dremio instance's OAuth 2.0 token endpoint",
          "maxLength": 1024,
          "type": "string"
        }
      },
      "required": [
        "tokenEndpoint",
        "personalAccessToken"
      ]
    },
    "intakeCatalog": {
      "description": "The Iceberg catalog configuration",
      "properties": {
        "auth": {
          "$ref": "#/$defs/catalogAuth"
        },
        "namespace": {
          "default": "intake",
          "description": "The namespace to which data shall be written. It will be automatically created, if it does not exist.",
          "maxLength": 1024,
          "type": "string"
        },
        "partitionBy": {
          "description": "List of Iceberg partitioning expressions to use when creating the target table.\nThis setting can only be used when `partitioning` is set to `manual`.\nPartitioning configuration of an Intake can be changed after creation, but will only take effect once the\ntable has been changed as well. In case of not updating the table to a new one, the old partitioning configuration \nwill remain.\nSee the [Apache Iceberg spec](https://iceberg.apache.org/spec/#partitioning) for more details.\n",
          "items": {
            "maxLength": 1024,
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "partitioning": {
          "$ref": "#/$defs/partitioningType"
        },
        "tableName": {
          "description": "The table name is a short name chosen by the user to identify the table in Iceberg.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "uri": {
          "description": "The URI to the Iceberg catalog endpoint",
          "maxLength": 1024,
          "type": "string"
        },
        "warehouse": {
          "description": "The Iceberg warehouse to connect to, required when the catalog has no default warehouse configured.",
          "maxLength": 1024,
          "type": "string"
        }
      },
      "required": [
        "uri",
        "warehouse"
      ]
    },
    "partitioningType": {
      "default": "none",
      "description": "The target table's partitioning.\n* `none` disables partitioning, the default.\n* `intake-time` configures daily partitioning based on the automatically created ingestion time column `__intake_ts`.\n* `manual` allows arbitrary Iceberg partitioning expression to be set via `partitionBy`.\n",
      "enum": [
        "none",
        "intake-time",
        "manual"
      ],
      "type": "string"
    }
  }
}