Obtaining Document Directories
Function
Obtain the document directory information in the knowledge base.
URI
GET /v1/{project_id}/applications/{application_id}/uni-search/{repo_id}/directory
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints: N/A Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
application_id |
Yes |
String |
Definition: Application ID. For details about how to obtain the application ID, see Obtaining an Application ID. Constraints: Character string Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
repo_id |
Yes |
String |
Definition: Knowledge base ID. How to obtain: Log in to the KooSearch experience platform. In the navigation tree on the left, choose Knowledge Bases to view knowledge base IDs. Each knowledge base has a unique ID stored in the vector database. Constraints: N/A Value range: Length: 1 to 64 characters. The value can contain only digits, letters, hyphens (-), and underscores (_). Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition: Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token. Constraints: N/A Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
directory_list |
Array of DirectoryInfo objects |
Definition: Directory list. Value range: N/A |
total |
Integer |
Definition: Total number of returned directories. Value range: N/A |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition: Directory name. Value range: N/A |
id |
String |
Definition: Directory ID. Value range: N/A |
parent_id |
String |
Definition: ID of the parent node directory. If the value is null, the node is a parent node. Value range: N/A |
level |
Integer |
Definition: Directory level. A maximum of five levels are supported. Value range: N/A |
create_time |
String |
Definition: Creation time. Value range: N/A |
update_time |
String |
Definition: Modification time. Value range: N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Value range: N/A |
error_msg |
String |
Definition: Error message. Value range: N/A |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Value range: N/A |
error_msg |
String |
Definition: Error message. Value range: N/A |
Example Requests
None
Example Responses
Status code: 200
Document directory information in the knowledge base obtained successfully.
{ "directory_list" : [ { "id" : "0b6a2f30-3f66-4e8b-bbeb-5dd8cb56b38ea", "name" : "new", "parent_id" : null, "level" : 1, "create_time" : "1733121281012", "update_time" : "1733121281012" }, { "id" : "2290f133-192b-404a-89bc-c31d3a4a2056", "name" : "Level-1 directory 1 - Level-2 directory 2", "parent_id" : "c7bdbc50-8fba-4164-9b83-a0e19908cbef", "level" : 2, "create_time" : "1733132651531", "update_time" : "1733132651531" }, { "id" : "a63faf94-d9ae-4a46-a297-8d0518d2ffa9", "name" : "Level-1 directory 1 - Level-2 directory 2 - Level-3 directory 2", "parent_id" : "c7bdbc50-8fba-4164-9b83-a0e19908cbef", "level" : 2, "create_time" : "1733226105107", "update_time" : "1733226105107" }, { "id" : "c7bdbc50-8fba-4164-9b83-a0e19908cbef", "name" : "Level-1 directory 1", "parent_id" : null, "level" : 1, "create_time" : "1733132627960", "update_time" : "1733132627960" }, { "id" : "ca7dbbf5-0082-492c-8d3a-e28e9a456d89", "name" : "Level-1 directory 1 - Level-2 directory 1", "parent_id" : "c7bdbc50-8fba-4164-9b83-a0e19908cbef", "level" : 2, "create_time" : "1733132648783", "update_time" : "1733132648783" } ], "total" : 5 }
Status Codes
Status Code |
Description |
---|---|
200 |
Document directory information in the knowledge base obtained successfully. |
400 |
Incorrect request body parameter. |
500 |
Internal error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot