{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sitegpt-ai/json-schema/sitegpt-ai-ingest-job-schema.json",
  "title": "IngestJob",
  "description": "A knowledge sync job. List responses add run summaries; single reads add the full run list.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sitegpt-ai-knowledge-sync-jobs-api-openapi.yml#/components/schemas/IngestJob",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "ingestConfig": {
      "$ref": "#/$defs/GenericObject",
      "description": "Ingestion configuration; request headers are redacted."
    },
    "syncFrequency": {
      "type": "string"
    },
    "scanFrequency": {
      "type": [
        "string",
        "null"
      ]
    },
    "tenantId": {
      "type": [
        "string",
        "null"
      ]
    },
    "totalIngestJobRuns": {
      "type": [
        "integer",
        "null"
      ],
      "description": "List responses only."
    },
    "latestIngestJobRun": {
      "anyOf": [
        {
          "$ref": "#/$defs/IngestJobRun"
        },
        {
          "type": "null"
        }
      ]
    },
    "ingestJobRuns": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/IngestJobRun"
          },
          {
            "type": "null"
          }
        ]
      },
      "description": "Single-job reads only."
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "$defs": {
    "GenericObject": {
      "type": "object",
      "additionalProperties": true
    },
    "IngestJobRun": {
      "type": "object",
      "description": "One run of a knowledge sync job.",
      "additionalProperties": true,
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "errorMessage": {
          "type": [
            "string",
            "null"
          ]
        },
        "tenantId": {
          "type": [
            "string",
            "null"
          ]
        },
        "documentStatsByStatus": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "status": {
                "type": "string"
              },
              "count": {
                "type": "integer"
              }
            }
          }
        },
        "createdAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "updatedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    }
  }
}