Web search
Function
Web search
URI
POST /v1/{project_id}/applications/{application_id}/uni-search/web/search
|
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 |
|---|---|---|---|
|
Token |
No |
String |
Definition: After a user logs in, a token is created for authentication based on the user login information. The user validity is verified through authentication. Constraints: N/A Value range: N/A Default value: N/A |
|
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 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repo_id |
No |
String |
Definition: Knowledge base ID. Constraints: N/A Value range: The value can contain 1 to 64 characters. It can only contain letters, digits, underscores (_), and hyphens (-). Default value: N/A |
|
chat_id |
No |
String |
Definition: Chat ID. Constraints: N/A Value range: The value can contain 1 to 64 characters. It can only contain letters, digits, underscores (_), and hyphens (-). Default value: N/A |
|
query |
Yes |
String |
Definition: User question. Constraints: N/A Value range: The value cannot be empty. It can contain a maximum of 20,480 characters. Default value: N/A |
|
history |
No |
Array of strings |
Definition: Chat history. Implementation logic:
Constraints:
Value range: The list length cannot exceed 40 characters. Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
query |
String |
Definition: User question. N/A Value range: N/A |
|
documents |
Array of Document objects |
Definition: Web search result. N/A Value range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
title |
String |
Definition: Title. Use this name and URL to create a hyperlink. Clicking the hyperlink will take the user to the web page. Value range: N/A |
|
content |
String |
Definition: Content. Value range: N/A |
|
url |
String |
Definition: Hyperlink. Value range: N/A |
|
timestamp |
String |
Definition: Update time (time when the web page is captured last time). The date format is YYYY-MM-DDTHH:MM:SS. Value range: N/A |
|
site_name |
String |
Definition: Site name Value range: N/A |
|
site_icon |
String |
Definition: Site icon address. Value range: N/A |
|
type |
String |
Definition: Search type. Value range: N/A |
|
id |
String |
Definition: ID. Value range: N/A |
|
size |
Long |
Definition: Size. Value range: N/A |
|
has_html |
Boolean |
Definition: Whether HTML is used. Value range:
|
|
source |
String |
Definition: Source 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
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Search response. |
|
400 |
Client error. |
|
500 |
Server 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