Dify Knowledge Base icon

Dify Knowledge Base

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

Document → Update Status

AI-generated

Overview

The node "Dify Knowledge Base" enables managing AI knowledge base datasets, documents, segments, and metadata through various CRUD (Create, Read, Update, Delete) operations. Specifically, for the Document - Update Status operation, it allows users to update the processing status of one or more documents within a specified dataset.

This operation is useful in scenarios where you need to programmatically change the state of documents, for example, marking documents as processed, flagged, or requiring reprocessing. It can be applied in workflows that automate document lifecycle management, content moderation, or batch updating document statuses after external processing.

Practical Example

  • Updating the status of multiple documents after an external review process.
  • Marking documents as "archived" or "active" based on business logic.
  • Resetting document statuses to trigger re-indexing or re-processing in the knowledge base.

Properties

Name Meaning
Dataset ID The unique identifier of the dataset containing the documents to update.
Document IDs A comma-separated list of document IDs whose statuses will be updated.

Output

The node outputs a JSON object representing the result of the update status operation. This typically includes confirmation of the updated documents and their new statuses. The exact structure depends on the API response but generally contains fields such as document IDs and their updated status values.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Dify AI knowledge base service.
  • Needs the base URL of the Dify API configured in the node credentials.
  • Relies on the external Dify API endpoints to perform dataset and document operations.

Troubleshooting

  • Common Issues:

    • Invalid or missing Dataset ID or Document IDs may cause the operation to fail.
    • Incorrect API credentials or expired tokens will result in authentication errors.
    • Providing document IDs that do not exist in the specified dataset will likely return errors or no updates.
  • Error Messages:

    • "The operation "updateStatus" is not supported for resource "document": Indicates a misconfiguration or typo in the operation name.
    • Authentication errors related to invalid API keys require checking and updating the stored credentials.
    • Network or API endpoint errors suggest verifying the base URL and network connectivity.
  • Resolution Tips:

    • Ensure all required properties are correctly filled.
    • Validate that document IDs exist and belong to the specified dataset.
    • Confirm API credentials are valid and have necessary permissions.

Links and References

Discussion