Querying All Tags of a Knowledge Base
Function
Query all tags of a knowledge base.
URI
GET /v1/{project_id}/applications/{application_id}/uni-search/{repo_id}/labels
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 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
page_num |
No |
Integer |
Definition: Page number of the current request, indicating the start page from data retrieval. The default value is 1, indicating to start from the first page. Constraints: N/A Value range: 1-65535 Default value: 1 |
page_size |
No |
Integer |
Definition: Number of records displayed on each page, indicating the number of records returned per request. The default value is 10, indicating that 10 records are displayed on each page. Constraints: N/A Value range: 1-65535 Default value: 10 |
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 |
---|---|---|
label_list |
Array of LabelInfo objects |
Definition: Tag list. Value range: N/A |
total |
Integer |
Definition: Total number of tags in the knowledge base. Value range: N/A |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition: Tag ID. Value range: N/A |
name |
String |
Definition: Tag name. The value can contain 1 to 255 characters. It can only contain letters, digits, and the following special characters: : - _ / . ? & = @ # / %+ ~ ! $ ' ( ) , ; []. The value must start with a letter or digit. In 25.2.T1, the following additional special characters are allowed in URLs: :/.?&=@#%+~!$'(),;[] Value range: N/A |
color |
String |
Definition: Tag color. Value range:
|
create_time |
String |
Definition: Creation time, which is a timeline. Value range: N/A |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
- |
String |
Example Requests
None
Example Responses
Status code: 200
The response for querying all tags in the knowledge base is successful.
{ "label_list" : [ { "id" : "3296", "name" : "test1", "color" : "RED", "create_time" : "1732797189009" }, { "id" : "6", "name" : "White", "color" : "BLUE", "create_time" : "1732871764233" }, { "id" : "6ad48f65-99dc-406b-9ea6-16e5b30d0240", "name" : "Friday", "color" : "RED", "create_time" : "1732872062619" }, { "id" : "9", "name" : "Tolstoy", "color" : "RED", "create_time" : "1732797203779" }, { "id" : "9d404d4a-3e6e-4e6e-a32b-a40fc4b944df", "name" : "Folder 1", "color" : "RED", "create_time" : "1732965317477" }, { "id" : "cc801dc3-2842-4d55-ae0b-1ceeae46f016", "name" : "Black", "color" : "BLUE", "create_time" : "1732872043823" }, { "id" : "ff0f33d6-98fa-4008-a90b-1050a0e0af38", "name" : "Dreaming About a Star River", "color" : "PURPLE", "create_time" : "1733226466014" } ], "total" : 7 }
Status Codes
Status Code |
Description |
---|---|
200 |
The response for querying all tags in the knowledge base is successful. |
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