Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dataset delete endpoint #5048

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

perzeuss
Copy link
Contributor

@perzeuss perzeuss commented Jun 9, 2024

Description

The Knowledge API currently supports the creation of Knowledges/Datasets but it does not support the deletion of Knowledges/Datasets. This PR adds the ability to delete Knowledges/Datasets.

This change has already been merged to the dev environment and can be tested there, see #5035

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I tested it manually with postman and curl.

  • Create an empty dataset e.g. with this command:
curl --location --request POST 'http://127.0.0.1:5001/v1/datasets' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{"name": "I can delet this via api"}'
  • Delete the dataset with this command:
curl --location --request DELETE 'http://127.0.0.1:5001/v1/datasets/{dataset_id}' \
--header 'Authorization: Bearer {api_key}'

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional New and existing unit tests pass locally with my changes

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 💪 enhancement New feature or request labels Jun 9, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 11, 2024
@crazywoola crazywoola merged commit 415816c into langgenius:main Jun 11, 2024
5 checks passed
@takatost takatost mentioned this pull request Jun 14, 2024
dengpeng pushed a commit to dengpeng/dify that referenced this pull request Jun 16, 2024
HuberyHuV1 pushed a commit to HuberyHuV1/dify that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants