---
title: "Retrieve a datasource"
method: GET
path: "/v2/knowledge/{knowledge_id}/datasources/{datasource_id}"
tags: ["Knowledge Bases"]
---

# Retrieve a datasource

`GET /v2/knowledge/{knowledge_id}/datasources/{datasource_id}`

Retrieves a datasource and its current processing status and chunk count.

## Path parameters

- `knowledge_id` string, required
- `datasource_id` string, required

## Response `200`

Datasource successfully retrieved

- Datasource
  - `display_name` string, required
  - `description` string, nullable — The description of the knowledge base
  - `status` 'pending' | 'processing' | 'completed' | 'failed' | 'queued', required
  - `file_id` string, nullable — The unique identifier of the file used to create the datasource.
  - `created` string, required
  - `updated` string, required
  - `created_by_id` string, uuid, nullable — The user ID of the creator of the knowledge base
  - `update_by_id` string, uuid, nullable — The user ID of the last user who updated the knowledge base
  - `knowledge_id` string, required
  - `chunks_count` number, double, required
  - `processing_attempts` ProcessingAttempt[] — Additive compatibility fields formerly available only from database-shaped responses.
    - `id` string, required
    - `started_at` string, required
    - `queued_at` string
    - `completed_at` string
    - `errors` ProcessingError[]
      - `code` integer
      - `message` string
    - `retryable` boolean
  - `metadata` CountMetadata
    - `words_count` number, double
    - `sentences_count` number, double
    - `paragraphs_count` number, double
    - `tokens_count` number, double
    - `characters_count` number, double
    - `chunks_count` number, double
  - `attachment` DatasourceAttachment
    - `id` string
    - `object_name` string
  - `_id` string, required

## Changes

> 254 revisions in range; 71 not diffed.

- **2026-08-24** `addad33219df` — 4 breaking, 10 info
  - the response property `metadata` became optional for the status `200`
  - the `_id` response's property type/format changed from `string`/`ulid` to `string`/`` for status `200`
  - the `created_by_id` response's property type/format changed from `string, null`/`` to `string, null`/`uuid` for status `200`
  - the `update_by_id` response's property type/format changed from `string, null`/`` to `string, null`/`uuid` for status `200`
  - …10 more
- **2026-08-21** `1586760a252f` — 10 breaking, 2 warning, 8 info
  - the response property `_id` became optional for the status `200`
  - the `chunks_count` response's property type/format changed from `number`/`double` to `number`/`` for status `200`
  - the `created_by_id` response's property type/format changed from `string, null`/`uuid` to `string, null`/`` for status `200`
  - the `metadata/characters_count` response's property type/format changed from `number`/`double` to `number`/`` for status `200`
  - …16 more
- …earlier changes not shown

[Full history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/knowledge/:knowledge_id/datasources/:datasource_id/get.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/revisions/b22330eb2d5a/schema)
