Overview
Submits feedback on multiple experiences. If positive=true, the service increments positive_count. If positive=false, the service increments negative_count.
API details
Constraints
- The caller must have an API key. For more information, see Manage AI API keys.
Request path
PATCH {BASE_URL}/api/v1/memory/spaces/{spaceId}/experiences/approval
Request headers
Name |
Required |
Example value |
Description |
|---|---|---|---|
| Authorization | Yes | Bearer {token} | Authentication information. |
| Content-Type | No | application/json | Request body format. |
| X-OB-Project-ID | Yes | Project ID |
Request parameters
Path parameters
Name |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| spaceId | string | Yes | space-123 | Memory space ID. |
Body parameters
Name |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| experience_ids | array<integer> |
Yes | [12345, 67890] | IDs of the experiences for which you want to submit feedback. |
| positive | boolean | Yes | true | Set the value to true to upvote the experiences and increment positive_count by 1. Set it to false to downvote the experiences and increment negative_count by 1. |
Response
Response parameters
Name |
Type |
Description |
|---|---|---|
| success | boolean | Whether the request was successful |
| code | string | Response code. |
| message | string | Response message. |
| data | object | Response data. |
Request example
curl --request PATCH '{BASE_URL}/api/v1/memory/spaces/{spaceId}/experiences/approval' \
--header 'Authorization: Bearer {token}' \
--header 'X-OB-Project-ID: {projectId}' \
--header 'Content-Type: application/json' \
--data '{
"experience_ids": [1, 2, 3],
"positive": true
}'
Response example
{
"success": true,
"code": "200",
"message": "successful",
"data": {}
}
