Skip to main content
GET
/
reports
List reports
curl --request GET \
  --url https://api.coval.dev/v1/reports \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.coval.dev/v1/reports"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.coval.dev/v1/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coval.dev/v1/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.coval.dev/v1/reports"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.coval.dev/v1/reports")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.coval.dev/v1/reports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "reports": [
    {
      "id": "01JABCDEFGHJKMNPQRSTVWXYZ0",
      "name": "Plan comparison",
      "run_ids": [
        "8EktrIgaVxn9LfxkIynagX",
        "9FltuJhbWyoAMgymJzobhY"
      ],
      "compare_by": "persona",
      "metadata_key": "customer.plan",
      "permissions": "PRIVATE",
      "simulation_output_ids": [
        "AGktrIgaVxn9LfxkIynagX"
      ],
      "source_human_review_project_id": "01JABCDEFGHJKMNPQRSTVWXYZ0"
    }
  ],
  "next_cursor": "50"
}
{
"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": "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."
}
]
}
}

Authorizations

x-api-key
string
header
required

API key for authentication

Query Parameters

cursor
string

Cursor from the previous page.

Pattern: ^\d+$
limit
integer
default:50

Maximum number of reports to return.

Required range: 1 <= x <= 100

Response

Reports retrieved successfully

reports
object[]
required
Maximum array length: 100
next_cursor
string | null

Cursor for fetching the next page of results.

Example:

"50"