{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/ada/main/json-schema/ada-knowledge-source-response-schema.json",
  "title": "KnowledgeSourceResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ada-knowledge-sources-api-openapi.yml#/components/schemas/KnowledgeSourceResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "A unique identifier for the knowledge source"
    },
    "external_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "An external identifier for the knowledge source"
    },
    "name": {
      "type": "string",
      "description": "The name of the knowledge source"
    },
    "metadata": {
      "oneOf": [
        {
          "$ref": "#/$defs/KnowledgeSourceResponseMetadata"
        },
        {
          "type": "null"
        }
      ],
      "description": "A dictionary of arbitrary key,value pairs.                     This data is not used by Ada, but can be used by the client to store additional information about                     the knowledge source."
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "The date the knowledge source was created"
    },
    "updated": {
      "type": "string",
      "format": "date-time",
      "description": "The date the knowledge source was last updated"
    },
    "last_sync": {
      "type": "string",
      "format": "date-time",
      "description": "The date the knowledge source was last synchronized"
    },
    "status": {
      "$ref": "#/$defs/KnowledgeSourceResponseStatus",
      "description": "Deletion lifecycle status of the knowledge source: `deleting` while an asynchronous deletion is in progress, `delete_failed` if the deletion failed. `null` when no deletion is in progress."
    }
  },
  "required": [
    "id",
    "name"
  ],
  "$defs": {
    "KnowledgeSourceResponseMetadata": {
      "type": "object",
      "properties": {},
      "description": "A dictionary of arbitrary key,value pairs.                     This data is not used by Ada, but can be used by the client to store additional information about                     the knowledge source.",
      "title": "KnowledgeSourceResponseMetadata"
    },
    "KnowledgeSourceResponseStatus": {
      "type": "string",
      "enum": [
        "deleting",
        "delete_failed"
      ],
      "description": "Deletion lifecycle status of the knowledge source: `deleting` while an asynchronous deletion is in progress, `delete_failed` if the deletion failed. `null` when no deletion is in progress.",
      "title": "KnowledgeSourceResponseStatus"
    }
  }
}