Update Annotation
PUThttps://api.confident-ai.com/v2/annotations/{annotationId}
Updates the rating, scale or text of an annotation and returns its id. The target it was left on cannot be changed: expectedOutput is rejected on a thread annotation, and expectedOutcome on a trace or span annotation.
curl -X PUT "https://api.confident-ai.com/v2/annotations/{annotationId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"rating": 0,
"type": "FIVE_STAR_RATING",
"explanation": "On reflection the answer omitted the source.",
"expectedOutput": "Mount Everest is 8,848 metres tall.",
"expectedOutcome": "The user learns how tall Mount Everest is.",
"imagesMapping": {}
}'{
"success": true,
"data": {
"id": "<ANNOTATION-ID>"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
annotationIdstringRequiredThe id of the annotation.
Request body
ratingintegerThe rating to record: 0 or 1 for a THUMBS_RATING, 1 to 5 for a FIVE_STAR_RATING.
typeenumThis is the type of annotation, which can be either thumbs rating or five star rating.
Show 2 enum valuesHide 2 enum values
FIVE_STAR_RATINGTHUMBS_RATING
explanationstringWhy the rating was given.
expectedOutputstringThe output the target should have produced. Only for an annotation left on a trace or span.
expectedOutcomestringThe outcome the conversation should have reached. Only for an annotation left on a thread.
imagesMappingobjectImages referenced by
[DEEPEVAL:IMAGE:<key>]markers in the text fields, keyed by that marker's key.
Response
Update Annotation succeeded.
successbooleanIndicates if the request was successful.
dataobjectA reference to an annotation by its id.
Show 1 propertyHide 1 property
idstringThe id of the annotation, generated by Confident AI.
deprecatedbooleanIndicates if this endpoint is deprecated.