curl --request PATCH \
--url https://api.coval.dev/v1/reports/{report_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Q2 plan comparison"
}
'
{
"report": {
"id": "01JABCDEFGHJKMNPQRSTVWXYZ0",
"created_at": null,
"created_by": null,
"updated_by": "01J000000000000000000000002",
"name": "Agent Outcomes",
"run_ids": [],
"simulation_output_ids": [],
"source_human_review_project_id": null,
"compare_by": "metadata",
"metadata_key": "rbi_vendor",
"permissions": "PRIVATE",
"updated_at": "2026-07-29T18:24:09.654321Z",
"revision": "2026-07-29T18:24:09.654321Z",
"view_config": {
"is_monitoring": true,
"compare_by": "metadata",
"metadata_key": "rbi_vendor",
"custom_dimension_id": null,
"view_mode": "grouped",
"secondary_compare_by": "none",
"secondary_metadata_key": null,
"secondary_custom_dimension_id": null,
"custom_dimensions": [],
"monitoring_filters": {
"start_date": "2026-07-01T00:00:00.000000Z",
"end_date": "2026-08-01T00:00:00.000000Z",
"monitoring_filter": true
}
},
"metric_config": {
"01JMETRICABCDEFGHJKMNPQRS": {
"visible": true,
"passing_threshold": 0.8
}
}
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request body",
"details": [
{
"field": "metadata_key",
"description": "metadata_key is required when compare_by is metadata"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "x-api-key",
"description": "API key is required in the x-api-key header"
}
]
}
}{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions",
"details": [
{
"field": "permissions",
"description": "The API key does not include the required report permission."
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Report not found",
"details": [
{
"field": "report_id",
"description": "Report not found or not authorized."
}
]
}
}{
"error": {
"code": "FAILED_PRECONDITION",
"message": "Report revision is stale",
"details": [
{
"field": "If-Match",
"description": "Report configuration changed after it was read. Fetch the report and retry."
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the report request"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Service temporarily unavailable",
"details": [
{
"description": "Database routing is temporarily unavailable. Please retry."
}
]
}
}Reports
Update report
Partially update a saved report. view_config is a typed, merge-only
patch: omitted supported fields, unknown compatible stored view fields,
metric_config, ownership, IDs, and permissions remain unchanged.
Send the ETag returned by GET /reports/{report_id} in If-Match
whenever view_config is present. A stale value is rejected with 412.
The legacy top-level compare_by and metadata_key fields remain
available for backward compatibility.
PATCH
/
reports
/
{report_id}
curl --request PATCH \
--url https://api.coval.dev/v1/reports/{report_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Q2 plan comparison"
}
'
{
"report": {
"id": "01JABCDEFGHJKMNPQRSTVWXYZ0",
"created_at": null,
"created_by": null,
"updated_by": "01J000000000000000000000002",
"name": "Agent Outcomes",
"run_ids": [],
"simulation_output_ids": [],
"source_human_review_project_id": null,
"compare_by": "metadata",
"metadata_key": "rbi_vendor",
"permissions": "PRIVATE",
"updated_at": "2026-07-29T18:24:09.654321Z",
"revision": "2026-07-29T18:24:09.654321Z",
"view_config": {
"is_monitoring": true,
"compare_by": "metadata",
"metadata_key": "rbi_vendor",
"custom_dimension_id": null,
"view_mode": "grouped",
"secondary_compare_by": "none",
"secondary_metadata_key": null,
"secondary_custom_dimension_id": null,
"custom_dimensions": [],
"monitoring_filters": {
"start_date": "2026-07-01T00:00:00.000000Z",
"end_date": "2026-08-01T00:00:00.000000Z",
"monitoring_filter": true
}
},
"metric_config": {
"01JMETRICABCDEFGHJKMNPQRS": {
"visible": true,
"passing_threshold": 0.8
}
}
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request body",
"details": [
{
"field": "metadata_key",
"description": "metadata_key is required when compare_by is metadata"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "x-api-key",
"description": "API key is required in the x-api-key header"
}
]
}
}{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions",
"details": [
{
"field": "permissions",
"description": "The API key does not include the required report permission."
}
]
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Report not found",
"details": [
{
"field": "report_id",
"description": "Report not found or not authorized."
}
]
}
}{
"error": {
"code": "FAILED_PRECONDITION",
"message": "Report revision is stale",
"details": [
{
"field": "If-Match",
"description": "Report configuration changed after it was read. Fetch the report and retry."
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the report request"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Service temporarily unavailable",
"details": [
{
"description": "Database routing is temporarily unavailable. Please retry."
}
]
}
}Headers
Body
application/json
Was this page helpful?