Dify Knowledge Base icon

Dify Knowledge Base

Manage Dify AI knowledge base datasets, documents, segments, and metadata with comprehensive CRUD operations

Segment → Delete Child

AI-generated

Overview

This node manages segments within a knowledge base dataset, specifically allowing you to delete a child segment of a given parent segment. It is useful in scenarios where hierarchical segmentation of data is maintained and you need to remove specific child segments without affecting the parent or sibling segments.

For example, if you have a dataset segmented into topics and subtopics, and you want to remove an outdated or irrelevant subtopic (child segment), this operation will help you do that cleanly.

Properties

Name Meaning
Dataset ID The unique identifier of the dataset containing the segment.
Segment ID The unique identifier of the parent segment from which a child segment will be deleted.
Child ID The unique identifier of the child segment to be deleted.

Output

The output JSON contains the result of the deletion operation for each input item processed. Typically, it will confirm successful deletion or provide details about the deleted child segment. If an error occurs, the output may include an error message describing the failure.

No binary data output is expected from this operation.

Dependencies

  • Requires an API key credential for authenticating requests to the external Dify AI knowledge base service.
  • The node uses the base URL and authorization token configured in the credentials to communicate with the Dify API.
  • No additional environment variables are required beyond the API authentication setup.

Troubleshooting

  • Common Issues:

    • Invalid or missing Dataset ID, Segment ID, or Child ID can cause the operation to fail.
    • Insufficient permissions or invalid API key may result in authorization errors.
    • Attempting to delete a non-existent child segment will likely return an error.
  • Error Messages:

    • "The operation "deleteChild" is not supported for resource "segment": This indicates a mismatch between selected operation and resource; ensure correct selections.
    • API errors related to authentication or resource not found will be returned as error messages in the output JSON.
  • Resolution Tips:

    • Verify all IDs are correct and correspond to existing entities in your knowledge base.
    • Ensure the API key has sufficient permissions.
    • Use the "listChildren" operation to confirm child segment existence before deletion.

Links and References

Discussion