get/api/v2/knowledge-sources/{id}

Get a Knowledge Base source.

Returns one project-scoped Knowledge Base source with indexed retrieval chunks and ingestion history for Content Agent context.

Requires bearer API key

Parameters

X-Project-Id

header

Required for organization-wide API keys on project-scoped endpoints. Project-scoped keys infer the project automatically.

Schema: string

id

path / required

No description provided.

Schema: string

Responses

200

Knowledge source detail.

application/json
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "source": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "id": {
          "type": "string"
        },
        "projectId": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "file",
            "url",
            "note"
          ]
        },
        "title": {
          "type": "string"
        },
        "originalUrl": {
          "type": "string",
          "nullable": true
        },
        "storagePath": {
          "type": "string",
          "nullable": true
        },
        "mimeType": {
          "type": "string",
          "nullable": true
        },
        "fileSizeBytes": {
          "type": "integer",
          "nullable": true
        },
        "bodyText": {
          "type": "string",
          "nullable": true
        },
        "summary": {
          "type": "string",
          "nullable": true
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "extracting",
            "ready",
            "failed"
          ]
        },
        "failureReason": {
          "type": "string",
          "nullable": true
        },
        "addedAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastIndexedAt": {
          "type": "string",
          "format": "date-time",
          "nullable": true
        }
      },
      "required": [
        "id",
        "kind",
        "title",
        "status",
        "addedAt",
        "updatedAt"
      ]
    },
    "chunks": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "chunkIndex": {
            "type": "integer"
          },
          "text": {
            "type": "string"
          },
          "tokenCount": {
            "type": "integer",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "chunkIndex",
          "text",
          "metadata",
          "createdAt"
        ]
      }
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "eventType",
          "createdAt"
        ]
      }
    },
    "totals": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "chunks": {
          "type": "integer"
        },
        "tokens": {
          "type": "integer"
        }
      },
      "required": [
        "chunks",
        "tokens"
      ]
    }
  },
  "required": [
    "source",
    "chunks",
    "events",
    "totals"
  ]
}
404

Error response.

application/json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  }
}

Try it

Send this request to the local WatchLLM REST handler. Use a key from `/workspace/api`; organization keys can include `X-Project-Id` only when the endpoint documents that header.