GET
/datasets/{dataset_id}Get Knowledge Base
Returns detailed information about a knowledge base, including its embedding model, retrieval configuration, and document statistics.
dataset_idstringrequired
Knowledge base ID, from [List Knowledge Bases](/en/api-reference/knowledge-bases/list-knowledge-bases). For a scoped key, [copy the ID from the Dify URL](/en/api-reference/guides/knowledge#knowledge-base-id).
200Knowledge base details.
app_countintegeroptional
Number of applications currently using this knowledge base.
author_namestringoptional
Display name of the creator.
built_in_field_enabledbooleanoptional
Whether built-in metadata fields (e.g., `document_name`, `uploader`) are enabled.
chunk_structurestringoptional
Chunk structure configuration.
created_atnumberoptional
Creation timestamp (Unix epoch in seconds).
created_bystringoptional
ID of the user who created the knowledge base.
data_source_typestringoptional
Data source type of the documents, `null` if not yet configured.
descriptionstringoptional
Optional text describing the purpose or contents of the knowledge base.
doc_formstringoptional
Document chunking mode. `text_model` for standard text chunking, `hierarchical_model` for parent-child structure, `qa_model` for QA pair extraction.
doc_metadataarray<object>optional
Metadata field definitions for the knowledge base.
document_countintegeroptional
Total number of documents in the knowledge base.
embedding_availablebooleanoptional
Whether the configured embedding model is currently available.
embedding_modelstringoptional
Name of the embedding model used for indexing.
embedding_model_providerstringoptional
Embedding model provider identifier, formatted as `organization/plugin_name/provider_name` (e.g. `langgenius/openai/openai`). Legacy knowledge bases may return the bare short form (e.g. `openai`).
enable_apibooleanoptional
Whether API access is enabled for this knowledge base.
external_knowledge_infoobjectoptional
Connection details for external knowledge bases. Present when `provider` is `external`.
external_retrieval_modelobjectoptional
Retrieval settings for external knowledge bases. `null` for internal knowledge bases.
icon_infoobjectoptional
Icon display configuration for the knowledge base.
idstringoptional
Unique identifier of the knowledge base.
indexing_techniquestringoptional
`high_quality` uses embedding models for precise search; `economy` uses keyword-based indexing.
is_multimodalbooleanoptional
Whether multimodal content processing is enabled.
is_publishedbooleanoptional
Whether the knowledge base is published.
maintainerstringoptional
Display name of the knowledge base maintainer. `null` if not set.
namestringoptional
Display name of the knowledge base. Unique within the workspace.
partial_member_listarray<string>optional
Account IDs of members granted access when `permission` is `partial_members`. Always present on the update response; on the detail response, present only when `permission` is `partial_members`.
permissionstringoptional
Controls who can access this knowledge base. Possible values: `only_me`, `all_team_members`, `partial_members`.
pipeline_idstringoptional
Pipeline ID, if a custom processing pipeline is configured.
providerstringoptional
Provider type. `vendor` for internally managed, `external` for external knowledge base connections.
retrieval_model_dictobjectoptional
Retrieval configuration for the knowledge base.
runtime_modestringoptional
Runtime processing mode.
summary_index_settingobjectoptional
Summary index configuration.
tagsarray<object>optional
Tags associated with this knowledge base.
total_available_documentsintegeroptional
Number of documents that are enabled and available.
total_documentsintegeroptional
Total number of documents.
updated_atnumberoptional
Last update timestamp (Unix epoch in seconds).
updated_bystringoptional
ID of the user who last updated the knowledge base.
word_countintegeroptional
Total word count across all documents.
403- `forbidden` : API access is not enabled for this knowledge base.
- `forbidden` : The API key is scoped to specific knowledge bases, and this knowledge base is not one of them.
One documented failure
forbiddenDataset api access is not enabled.
forbidden (api access)
404`not_found` : No knowledge base matches `dataset_id`.
One documented failure
not_foundDataset not found.
not_found
Error handling
A 403 is returned: - forbidden : API access is not enabled for this knowledge base.
forbidden: The API key is scoped to specific knowledge bases, and this knowledge base is not one of them. A 404 is returned:not_found: No knowledge base matchesdataset_id.