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

# List all datasources

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

## 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
- `metadata` object — Filter datasources by exact metadata key/value pairs. Provide a JSON-encoded object when calling this endpoint over HTTP.

## Response `200`

Datasources successfully retrieved

- object
  - `object` 'list', required
  - `data` object[], required
    - `_id` string, ulid — The unique identifier of the data source
    - `display_name` string, required — The display name of the datasource. Normally the name of the uploaded file
    - `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 — The date and time the datasource was created
    - `updated` string, required — The date and time the datasource was updated
    - `created_by_id` string, nullable — The user ID of the creator of the knowledge base
    - `update_by_id` string, nullable — The user ID of the last user who updated the knowledge base
    - `knowledge_id` string, required — The unique identifier of the knowledge base
    - `chunks_count` number, required — The number of chunks in the datasource
    - `metadata` object, required
      - `words_count` number — Number of words in the text
      - `sentences_count` number — Number of sentences in the text
      - `paragraphs_count` number — Number of paragraphs in the text
      - `tokens_count` number — Number of tokens in the text
      - `characters_count` number — Number of characters in the text
      - `chunks_count` number — Number of total chunks
  - `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/versions/6a22c53a2580/schema)
