Metadata

List Metadata Fields

Returns all metadata fields for the knowledge base, both custom and built-in, with the count of documents using each field.

get/datasets/{dataset_id}/metadata

Request

  • Base URL
    https://api.dify.ai/v1
  • URL
    https://api.dify.ai/v1/datasets/{dataset_id}/metadata
  • Auth
    HTTP bearer

Path parameters

dataset_idstring uuid required

Knowledge base ID, from List Knowledge Bases. For a scoped key, copy the ID from the Dify URL.

Response

Metadata fields for the knowledge base.

built_in_field_enabledboolean

Whether built-in metadata fields are enabled for this knowledge base.

Changes

No recorded changes to this operation across all 17 revisions of this API.