Obtaining the Prompt List
Function
Obtain the prompt list.
URI
GET /v1/{project_id}/applications/{application_id}/uni-search/prompt
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 |
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 |
|---|---|---|
page_num | String | Definition: Page turning flag. Value range: N/A |
page_size | String | Definition: Page turning size. Value range: N/A |
total | String | Definition: Data size Value range: N/A |
data_list | Array of GetPromptResponseBody objects | Definition: Prompt list. Value range: N/A |
Parameter | Type | Description |
|---|---|---|
id | String | Definition: Prompt ID. Value range: The value can contain only 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. |
name | String | Definition: Prompt name. Value range: The value contains a maximum of 64 characters. |
detail | String | Definition: Prompt description. Value range: The value contains a maximum of 64 characters. |
type | String | Definition: Prompt type. Value range: N/A |
create_time | String | Definition: Prompt creation time. Value range: N/A |
update_time | String | Definition: Prompt update time. Value range: N/A |
prompts | Array of PromptItem objects | Definition: Prompt language list. Value range: N/A |
knowledge_repos | Array of KnowledgeRepoItem objects | Definition: Knowledge base information. Value range: N/A |
actions | Array of strings | Definition: Permissions. Value range: N/A |
freemarker_enabled | Boolean | Definition: Whether to enable the FreeMarker template engine. Constraints: N/A Value range: Default value: false |
search_scope | String | Definition: Search scope. Value range: |
creator | String | Definition: Prompt creator. Value range: N/A |
Parameter | Type | Description |
|---|---|---|
language | String | Definition: Language name. Constraints: N/A Value range: Default value: N/A |
prompt | String | Definition: Prompt. Constraints: N/A Value range: The value contains a maximum of 8,192 characters. Default value: N/A |
attention | String | Definition: Notes. Constraints: N/A Value range: The maximum length is 65,535 characters. Default value: N/A |
Parameter | Type | Description |
|---|---|---|
id | String | Definition: Knowledge base ID. Value range: N/A |
name | String | Definition: Knowledge base name. 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
Obtaining the Prompt List
/v1/b25446daeb1a41a7953c5deba2b2677a/applications/5071b12e-8c5c-4181-a15b-41e6ae3915ea/uni-search/prompt?page_num=1&page_size=10
Example Responses
Status code: 200
Obtain the prompt list.
{
"page_num" : 1,
"page_size" : 10,
"total" : 1,
"data_list" : [ {
"id" : "031d77dd-66b1-49c9-a651-bca9f65f17fc",
"name" : "api_test",
"type" : "CHAT_PROMPT",
"detail" : "",
"create_time" : "1764071308539",
"update_time" : "1764071308539",
"knowledge_repos" : [ ],
"prompts" : [ {
"language" : "ar",
"prompt" : "xxxx",
"attention" : "xxxxxx"
}, {
"language" : "en",
"prompt" : "xxxx",
"attention" : "xxxxxx"
}, {
"language" : "es",
"prompt" : "xxxx",
"attention" : "xxxxxx"
}, {
"language" : "pt",
"prompt" : "xxxx",
"attention" : "xxxxxx"
}, {
"language" : "th",
"prompt" : "xxxx",
"attention" : "xxxxxx"
}, {
"language" : "zh",
"prompt" : "xxxx",
"attention" : "xxxxxx"
} ],
"search_scope" : "DOCUMENT",
"creator" : "",
"freemarker_enabled" : false
} ]
} Status Codes
Status Code | Description |
|---|---|
200 | Obtain the prompt list. |
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
