show knowledge metadata `id` in frontend or allow setting metadata via API by `name` only
Self Checks
- [x] I have read the Contributing Guide and Language Policy.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I am uploading files via API into a knowledgebase and wanted to set the metadata at the same time. This is not possible and so I had to use the separate endpoint /datasets/<uuid:dataset_id>/documents/metadata. I am hoping that I am allowed to use it since it is not documented in the API documentation.
For this endpoint, you need to specify the id, name and value of the metadata.
But: there is no way to get this id from the frontend.
I had to manually call another API just to get the id of the metadata which was very frustating.
What I also don't understand: why do I need to specify both id and name? Especially since name is already unique. Being able to only specify name would lead to the great feature of uploading metadata with the same name to different datasets, without needing to know the specific id of that metadata from that specific dataset. I hope that makes sense.
2. Additional context or comments
Please either give us the ability to set metadata by name only (which I would prefer), or make the id visible in the frontend.
3. Can you help us with this feature?
- [ ] I am interested in contributing to this feature.
Hi, @Mutantpenguin. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.
Issue Summary:
- You requested an enhancement to simplify metadata handling in the API or frontend.
- Specifically, you suggested either showing the metadata
idin the frontend or allowing metadata to be set using only the uniquenamevia the API. - Currently, both
idandnameare required, but theidis not accessible from the frontend, complicating metadata uploads. - No further comments or updates have been made on this issue so far.
Next Steps:
- Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
- If I don’t hear back within 15 days, I will automatically close this issue.
Thanks for your understanding and contribution!
It's still relevant.
@crazywoola The user has confirmed that the issue regarding simplifying metadata handling in the API/frontend is still relevant and needs attention. Could you please assist?