Feedback REST API¶
Use this API to collect feedback about Cortex Agents from end users.
Collect feedback about a Cortex Agent¶
POST /api/v2/databases/{database}/schemas/{schema}/agents/{name}:feedback
Creates a feedback event for a Cortex Agent response.
请求¶
路径参数¶
参数 |
描述 |
|---|---|
|
(Required) Identifier for the database to which the resource belongs. You can use the /api/v2/databases GET request to get a list of available databases. |
|
(Required) Identifier for the schema to which the resource belongs. You can use the /api/v2/databases/{database}/schemas GET request to get a list of available schemas for the specified database. |
|
(Required) Identifier for the agent. |
请求标头¶
标头 |
描述 |
|---|---|
|
(必需)授权令牌。有关更多信息,请参阅 身份验证。 |
|
(必需)应用程序/json |
请求正文¶
The request body contains the feedback details for the agent response.
字段 |
类型 |
描述 |
|---|---|---|
|
字符串 |
Request ID associated with the feedback. |
|
布尔 |
Whether the response was good ( |
|
字符串 |
The text for the detailed feedback message. |
|
array of strings |
List of categories for the feedback. Each category is a string that represents a specific category of feedback. |
|
整数 |
The id of the thread. |
Example request body¶
{
"categories": [
"Something worked well"
],
"feedback_message": "this is fantastic!",
"positive": true
}
响应¶
A successful response returns a confirmation message.
Response headers¶
标头 |
描述 |
|---|---|
|
Unique ID of the API request. |
Response body¶
{
"status": "Feedback submitted successfully"
}