[DOCS]: API interface query to retrieve the tags bound to the dataset #290

Closed
opened 2026-02-16 05:19:46 -05:00 by yindo · 3 comments
Owner

Originally created by @JMY-T on GitHub (Dec 11, 2025).

Type of Documentation Change

Error/Typo fix

Documentation Page URL or Path

https://docs.dify.ai/api-reference/%E5%85%83%E6%95%B0%E6%8D%AE%E5%92%8C%E6%A0%87%E7%AD%BE/%E6%9F%A5%E8%AF%A2%E7%BB%91%E5%AE%9A%E5%88%B0%E6%95%B0%E6%8D%AE%E9%9B%86%E7%9A%84%E6%A0%87%E7%AD%BE

Current Content

When querying the tag interface bound to the dataset using the POST method, an error occurred. However, switching to the GET method resolved the issue.
In addition, there are relatively few interfaces related to metadata and knowledge retrieval, and the interface descriptions are not detailed enough. Some hidden interfaces and parameters are not displayed.

Suggested Changes

Improve relevant interfaces of the knowledge base

Reason for Change

There is an issue with the knowledge base retrieval node, as the metadata filtering automatic mode did not output as expected.
The keywords have been clearly identified in the user's question, and the knowledge base search node has set up automatic data filtering mode. However, the output result does not include the expected document name.
Attempting to implement metadata filtering through an interface for knowledge retrieval, it was found that the interface document was incomplete.

Code of Conduct

  • I agree to follow Dify's documentation contribution guidelines
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.
Originally created by @JMY-T on GitHub (Dec 11, 2025). ### Type of Documentation Change Error/Typo fix ### Documentation Page URL or Path https://docs.dify.ai/api-reference/%E5%85%83%E6%95%B0%E6%8D%AE%E5%92%8C%E6%A0%87%E7%AD%BE/%E6%9F%A5%E8%AF%A2%E7%BB%91%E5%AE%9A%E5%88%B0%E6%95%B0%E6%8D%AE%E9%9B%86%E7%9A%84%E6%A0%87%E7%AD%BE ### Current Content When querying the tag interface bound to the dataset using the POST method, an error occurred. However, switching to the GET method resolved the issue. In addition, there are relatively few interfaces related to metadata and knowledge retrieval, and the interface descriptions are not detailed enough. Some hidden interfaces and parameters are not displayed. ### Suggested Changes Improve relevant interfaces of the knowledge base ### Reason for Change There is an issue with the knowledge base retrieval node, as the metadata filtering automatic mode did not output as expected. The keywords have been clearly identified in the user's question, and the knowledge base search node has set up automatic data filtering mode. However, the output result does not include the expected document name. Attempting to implement metadata filtering through an interface for knowledge retrieval, it was found that the interface document was incomplete. ### Code of Conduct - [x] I agree to follow Dify's documentation [contribution guidelines](https://github.com/langgenius/dify/blob/0277a37fcad5ad86aeb239485c27fffd5cd90043/CONTRIBUTING.md) - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields.
yindo added the documentation label 2026-02-16 05:19:46 -05:00
yindo closed this issue 2026-02-16 05:19:46 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 11, 2025):

Hi @JMY-T! I'm Dosu and I’m helping the dify-docs team.

The correct API method for retrieving tags bound to a dataset in Dify is a GET request to /datasets/<uuid:dataset_id>/tags. Using POST for this endpoint will result in an error, as only GET is supported for tag retrieval according to the codebase implementation. The GET response includes a list of tags and the total count for the specified dataset. POST is used only for binding or unbinding tags, not for retrieval. The documentation should be updated to reflect this and remove any references to POST for tag retrieval.
See code reference

For knowledge base retrieval and metadata filtering, the API now supports keyword and tag searches, and recent updates have added metadata-based search capabilities (such as filtering by tags, creation date, author, and file type). However, documentation for these features is still incomplete, and some parameters (like those for metadata filtering) are not fully described.
See issue and feature request

If you are implementing metadata filtering, ensure your request body is structured correctly, especially for manual filtering. For example, the metadata_condition object should include a logical operator and an array of conditions, each with a name, comparison operator, and value.
See example and bug report

There are ongoing improvements to metadata management and retrieval interfaces, but the documentation needs to be updated to clarify supported parameters, request formats, and expected behaviors for both tag retrieval and metadata filtering endpoints.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 11, 2025): <!-- Greeting --> Hi @JMY-T! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify-docs team. <!-- Answer --> The correct API method for retrieving tags bound to a dataset in Dify is a GET request to `/datasets/<uuid:dataset_id>/tags`. Using POST for this endpoint will result in an error, as only GET is supported for tag retrieval according to the codebase implementation. The GET response includes a list of tags and the total count for the specified dataset. POST is used only for binding or unbinding tags, not for retrieval. The documentation should be updated to reflect this and remove any references to POST for tag retrieval. [See code reference](https://github.com/langgenius/dify/blob/61ee1b9094ff077e94ec4c01f7d8f24e08930e82/api/controllers/service_api/dataset/dataset.py#L453-L617) For knowledge base retrieval and metadata filtering, the API now supports keyword and tag searches, and recent updates have added metadata-based search capabilities (such as filtering by tags, creation date, author, and file type). However, documentation for these features is still incomplete, and some parameters (like those for metadata filtering) are not fully described. [See issue and feature request](https://github.com/langgenius/dify/issues/16462) If you are implementing metadata filtering, ensure your request body is structured correctly, especially for manual filtering. For example, the `metadata_condition` object should include a logical operator and an array of conditions, each with a name, comparison operator, and value. [See example and bug report](https://github.com/langgenius/dify/issues/18365) There are ongoing improvements to metadata management and retrieval interfaces, but the documentation needs to be updated to clarify supported parameters, request formats, and expected behaviors for both tag retrieval and metadata filtering endpoints. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/885fd044-b7a7-4124-9688-2c00620fe838?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/885fd044-b7a7-4124-9688-2c00620fe838?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/885fd044-b7a7-4124-9688-2c00620fe838?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/885fd044-b7a7-4124-9688-2c00620fe838?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/885fd044-b7a7-4124-9688-2c00620fe838?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/885fd044-b7a7-4124-9688-2c00620fe838?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/885fd044-b7a7-4124-9688-2c00620fe838?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20correct%20API%20method%20for%20retrieving%20tags%20bound%20to%20a%20dataset%20in%20Dify%20is%20a%20GET%20request%20to%20%60/datasets/%3Cuuid%3Adataset_id%3E/tags%60.%20Using%20POST%20for%20this%20endpoint%20will%20result%20in%20an%20error%2C%20as%20only%20GET%20is%20supported%20for%20tag%20retrieval%20according%20to%20the%20codebase%20implementation.%20The%20GET%20response%20includes%20a%20list%20of%20tags%20and%20the%20total%20count%20for%20the%20specified%20dataset.%20POST%20is%20used%20only%20for%20binding%20or%20unbinding%20tags%2C%20not%20for%20retrieval.%20The%20documentation%20should%20be%20updated%20to%20reflect%20this%20and%20remove%20any%20references%20to%20POST%20for%20tag%20retrieval.%20%20%0A%5BSee%20code%20reference%5D%28https%3A//github.com/langgenius/dify/blob/61ee1b9094ff077e94ec4c01f7d8f24e08930e82/api/controllers/service_api/dataset/dataset.py%23L453-L617%29%0A%0AFor%20knowledge%20base%20retrieval%20and%20metadata%20filtering%2C%20the%20API%20now%20supports%20keyword%20and%20tag%20searches%2C%20and%20recent%20updates%20have%20added%20metadata-based%20search%20capabilities%20%28such%20as%20filtering%20by%20tags%2C%20creation%20date%2C%20author%2C%20and%20file%20type%29.%20However%2C%20documentation%20for%20these%20features%20is%20still%20incomplete%2C%20and%20some%20parameters%20%28like%20those%20for%20metadata%20filtering%29%20are%20not%20fully%20described.%20%20%0A%5BSee%20issue%20and%20feature%20request%5D%28https%3A//github.com/langgenius/dify/issues/16462%29%0A%0AIf%20you%20are%20implementing%20metadata%20filtering%2C%20ensure%20your%20request%20body%20is%20structured%20correctly%2C%20especially%20for%20manual%20filtering.%20For%20example%2C%20the%20%60metadata_condition%60%20object%20should%20include%20a%20logical%20operator%20and%20an%20array%20of%20conditions%2C%20each%20with%20a%20name%2C%20comparison%20operator%2C%20and%20value.%20%20%0A%5BSee%20example%20and%20bug%20report%5D%28https%3A//github.com/langgenius/dify/issues/18365%29%0A%0AThere%20are%20ongoing%20improvements%20to%20metadata%20management%20and%20retrieval%20interfaces%2C%20but%20the%20documentation%20needs%20to%20be%20updated%20to%20clarify%20supported%20parameters%2C%20request%20formats%2C%20and%20expected%20behaviors%20for%20both%20tag%20retrieval%20and%20metadata%20filtering%20endpoints.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-docs/issues/610)
Author
Owner

@RiskeyL commented on GitHub (Dec 12, 2025):

Hi @JMY-T, thanks for your feedback! We've updated the interface method from POST to GET. We are currently refactoring the help documentation and API docs related to the knowledge base, and we will incorporate your suggestions into future updates.

@RiskeyL commented on GitHub (Dec 12, 2025): Hi @JMY-T, thanks for your feedback! We've updated the interface method from POST to GET. We are currently refactoring the help documentation and API docs related to the knowledge base, and we will incorporate your suggestions into future updates.
Author
Owner

@dosubot[bot] commented on GitHub (Dec 23, 2025):

Hi, @JMY-T. I'm Dosu, and I'm helping the dify-docs team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported problems with the API documentation about tag retrieval for datasets, specifically that POST requests caused errors while GET worked.
  • You also noted incomplete interface descriptions and metadata filtering support.
  • It was clarified that only GET is supported for tag retrieval and recent metadata filtering improvements were explained.
  • The maintainer confirmed updating the method to GET and is working on refactoring and improving the API documentation and knowledge base.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of the dify-docs repository by commenting here.
  • If I don’t hear back from you, this issue will be automatically closed in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Dec 23, 2025): Hi, @JMY-T. I'm [Dosu](https://dosu.dev), and I'm helping the dify-docs team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported problems with the API documentation about tag retrieval for datasets, specifically that POST requests caused errors while GET worked. - You also noted incomplete interface descriptions and metadata filtering support. - It was clarified that only GET is supported for tag retrieval and recent metadata filtering improvements were explained. - The maintainer confirmed updating the method to GET and is working on refactoring and improving the API documentation and knowledge base. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of the dify-docs repository by commenting here. - If I don’t hear back from you, this issue will be automatically closed in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs#290