Endpoint
Header
This API is used to connect to a knowledge base that is independent of the Dify and maintained by developers. For more details, please refer to Connecting to an External Knowledge Base. You can useAPI-Key in the Authorization HTTP Header to verify permissions. The authentication logic is defined by you in the retrieval API, as shown below:
Request Body Elements
The request accepts the following data in JSON format.
The
retrieval_setting property is an object containing the following keys:
The
metadata_condition property is an object containing the following keys:
Each object in the
conditions array contains the following keys:
Supported
comparison_operator operators:
contains: Contains a certain valuenot contains: Does not contain a certain valuestart with: Starts with a certain valueend with: Ends with a certain valueis: Equals a certain valueis not: Does not equal a certain valueempty: Is emptynot empty: Is not empty=: Equals≠: Not equal>: Greater than<: Less than≥: Greater than or equal to≤: Less than or equal tobefore: Before a certain dateafter: After a certain date
Request Syntax
Response Elements
If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service.
The
records property is a list object containing the following keys:
Response Syntax
Errors
If the action fails, the service sends back the following error information in JSON format:
The
error_code property has the following types: