Dify Knowledge Base icon

Dify Knowledge Base

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

Metadata → Get Tags

AI-generated

Overview

The node interacts with the "Metadata" resource of a knowledge base system, specifically supporting the "Get Tags" operation. This operation retrieves tags associated with a specified dataset, allowing users to manage and organize metadata effectively.

Common scenarios include:

  • Fetching all tags linked to a particular dataset for categorization or filtering.
  • Paginating through large sets of tags when datasets have many metadata entries.
  • Integrating tag retrieval into workflows that automate dataset management or reporting.

Practical example:

  • A user wants to list all tags for a dataset identified by its ID to display them in a dashboard or use them as filters in subsequent processing steps.

Properties

Name Meaning
Dataset ID The unique identifier of the dataset whose tags you want to retrieve.
Additional Fields Optional parameters to control pagination:
- Page: The page number to fetch (default is 1).
- Limit: Maximum number of results to return per page (minimum 1, default 50).

Output

The node outputs JSON data containing the retrieved tags for the specified dataset. The structure typically includes an array of tag objects, each representing a metadata tag associated with the dataset.

If the dataset has many tags, the output respects pagination settings, returning only the requested subset of tags.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating requests to the Dify AI knowledge base service.
  • Needs the base URL of the Dify API configured in the node credentials.
  • The node depends on the external Dify Knowledge Base API to fetch metadata tags.

Troubleshooting

  • Common issues:

    • Invalid or missing Dataset ID will cause the operation to fail.
    • Incorrect API credentials or base URL configuration can lead to authentication errors.
    • Requesting pages beyond the available range may return empty results.
  • Error messages:

    • "The operation "getTags" is not supported for resource "metadata": Indicates a misconfiguration or unsupported operation; ensure the correct resource and operation are selected.
    • Authentication errors usually mention invalid tokens or unauthorized access; verify API key and permissions.
    • Pagination errors might occur if page or limit values are out of acceptable ranges; adjust these parameters accordingly.

Links and References

Discussion