curl --request PATCH \
--url https://api.coval.dev/v1/review-annotations/{annotation_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"ground_truth_float_value": 0.85
}
'{
"review_annotation": {
"name": "review-annotations/abc123def456ghi789jklm",
"id": "abc123def456ghi789jklm",
"simulation_output_id": "<string>",
"metric_id": "<string>",
"assignee": "<string>",
"status": "ACTIVE",
"completion_status": "PENDING",
"priority": "PRIORITY_STANDARD",
"create_time": "2023-11-07T05:31:56Z",
"update_time": "2023-11-07T05:31:56Z",
"assignee_user_id": "<string>",
"ground_truth_float_value": 123,
"ground_truth_string_value": "<string>",
"ground_truth_subvalues_by_timestamp": [
{}
],
"reviewer_notes": "<string>",
"annotations": {},
"canonical_annotation_id": "<string>",
"ground_truth_json": {},
"ground_truth_set_value": [
"<string>"
],
"project_annotation_id": "<string>"
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request body",
"details": [
{
"field": "simulation_output_id",
"description": "simulation_output_id is required"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": [
{
"field": "annotation_id",
"description": "Annotation not found or not accessible by your organization"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameter",
"details": [
{
"field": "<string>",
"description": "<string>"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameter",
"details": [
{
"field": "<string>",
"description": "<string>"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred"
}
]
}
}Reviews
Update review annotation
Partially update an existing saved review annotation using its annotation ID.
Create the annotation with POST before attempting to update it; project
assignment IDs cannot be used as annotation IDs.
The reviewer cannot be changed. A different non-null assignee returns
HTTP 400 (INVALID_ARGUMENT); create an annotation for that reviewer instead.
Completion status is derived from saved ground truth and, when project_id
is supplied, the applicable project rules.
Another reviewer’s annotation returns HTTP 404 unless the caller manages the
supplied project_id. The simulation output, metric, and reviewer ID cannot
be changed; supplying simulation_output_id, metric_id, or assignee_user_id
returns HTTP 400 (INVALID_ARGUMENT).
PATCH
/
review-annotations
/
{annotation_id}
curl --request PATCH \
--url https://api.coval.dev/v1/review-annotations/{annotation_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"ground_truth_float_value": 0.85
}
'{
"review_annotation": {
"name": "review-annotations/abc123def456ghi789jklm",
"id": "abc123def456ghi789jklm",
"simulation_output_id": "<string>",
"metric_id": "<string>",
"assignee": "<string>",
"status": "ACTIVE",
"completion_status": "PENDING",
"priority": "PRIORITY_STANDARD",
"create_time": "2023-11-07T05:31:56Z",
"update_time": "2023-11-07T05:31:56Z",
"assignee_user_id": "<string>",
"ground_truth_float_value": 123,
"ground_truth_string_value": "<string>",
"ground_truth_subvalues_by_timestamp": [
{}
],
"reviewer_notes": "<string>",
"annotations": {},
"canonical_annotation_id": "<string>",
"ground_truth_json": {},
"ground_truth_set_value": [
"<string>"
],
"project_annotation_id": "<string>"
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request body",
"details": [
{
"field": "simulation_output_id",
"description": "simulation_output_id is required"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": [
{
"field": "annotation_id",
"description": "Annotation not found or not accessible by your organization"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameter",
"details": [
{
"field": "<string>",
"description": "<string>"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameter",
"details": [
{
"field": "<string>",
"description": "<string>"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred"
}
]
}
}Query Parameters
Body
application/json
Was this page helpful?