---
title: "Get a knowledge base by ID"
method: GET
path: "/v1/knowledge-base/{id}"
tags: ["Knowledge Base"]
---

# Get a knowledge base by ID

`GET /v1/knowledge-base/{id}`

Returns metadata for a single knowledge base. Does not include content — content is read by metrics at evaluation time and is not exposed over the public API.

## Path parameters

- `id` string, required

## Response `200`

The requested knowledge base.

- object
  - `data` object, required — A customer-uploaded reference document attached to custom metrics as ground truth at evaluation time.
    - `id` string, uuid, required — Unique identifier of the knowledge base.
    - `name` string, required — Customer-supplied name. Unique within the project.
    - `description` string, nullable, required — Optional customer-supplied description.
    - `sourceType` 'TEXT' | 'FILE' | 'JSON' | 'URL', required — How the knowledge base content was provided. TEXT/JSON are stored as-is; FILE was uploaded and its text content extracted (PDF → text); URL was scraped from a webpage into markdown.
    - `status` 'READY' | 'PROCESSING' | 'PENDING_UPLOAD' | 'FAILED', required — Lifecycle of the knowledge base. READY means the content is available to metrics. PROCESSING is set during PDF text extraction. FAILED means extraction errored — see `errorMessage`.
    - `originalFilename` string, nullable, required — For FILE source: the customer-supplied filename. Null for TEXT/JSON/URL.
    - `mimeType` string, nullable, required — For FILE source: the mime type of the uploaded file. Null for TEXT/JSON/URL.
    - `sourceUrl` string, nullable, required — For URL source: the page that was scraped into markdown. Null for TEXT/JSON/FILE.
    - `byteSize` integer, required — Size of the content the model will read at evaluation time. For FILE this is the EXTRACTED text size, not the original PDF size.
    - `contentHash` string, nullable, required — SHA-256 of the content. Stable across whitespace-equivalent edits for JSON (pretty-printed before hashing). Use it to detect change without diffing the content.
    - `errorMessage` string, nullable, required — When `status` is FAILED, the reason. Null otherwise.
    - `createdAt` string, required — Creation timestamp in ISO 8601 format.
    - `updatedAt` string, required — Last update timestamp in ISO 8601 format.

## Other responses

- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-08-17** `887b091b3d81` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/roarkhq/apis/roark-analytics-api/changes/v1/knowledge-base/:id/get.md)

---

[API](https://skmtc.dev/roarkhq/apis/roark-analytics-api.md) · [All operations](https://skmtc.dev/roarkhq/apis/roark-analytics-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/roarkhq/roark-analytics-api/revisions/1d61b68e9429/schema)
