---
title: "List all datasources"
method: GET
path: "/v2/knowledge/{knowledge_id}/datasources"
tags: ["Knowledge Bases"]
---

# List all datasources

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

Returns the datasources in a knowledge base. Use cursors to page through results and optional query or status filters to narrow the list.

## Path parameters

- `knowledge_id` string, required — Unique identifier of the knowledge base

## Query parameters

- `starting_after` string — A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
- `ending_before` string — A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
- `q` string — Search query to find datasources by name.
- `limit` number — A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
- `status` union — Filter datasources by status.
  - string[]
  - string

## Response `200`

Datasources successfully retrieved

- DatasourcesServiceListResponse
  - `object` 'list', required
  - `data` Datasource[], required
    - `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
  - `has_more` boolean, required

---

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