Skip to main content
GET
/
conversations
/
{conversation_id}
/
metrics
List conversation metrics
curl --request GET \
  --url https://api.coval.dev/v1/conversations/{conversation_id}/metrics \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.coval.dev/v1/conversations/{conversation_id}/metrics"

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/conversations/{conversation_id}/metrics', 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/conversations/{conversation_id}/metrics",
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/conversations/{conversation_id}/metrics"

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/conversations/{conversation_id}/metrics")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.coval.dev/v1/conversations/{conversation_id}/metrics")

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
{
  "metrics": [
    {
      "metric_output_id": "01JCQR8Z9PQSTNVWXY12345678",
      "metric_id": "29BlkepvvX19ebbLDB0y6Q",
      "value": 2.35,
      "status": "COMPLETED"
    },
    {
      "metric_output_id": "01JCQR9A1BRSUWVXYZ12345678",
      "metric_id": "mymKvEg6ZA65srXbTX5wSM",
      "value": "positive",
      "status": "COMPLETED"
    },
    {
      "metric_output_id": "01JCQR9B2CRTUVWXYZ12345678",
      "metric_id": "fstokU4ev5UmT8sUBexiwV",
      "value": "resolved",
      "status": "COMPLETED"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

API key for authentication.

Path Parameters

conversation_id
string
required

Unique conversation identifier

Required string length: 22 - 26

Query Parameters

filter
string

Filter expression syntax.

Values may be unquoted or double-quoted. Values containing spaces must be quoted.

Supported fields:

  • metric_name (string): Filter by metric name (e.g., metric_name=latency)
  • status (string): Filter by status (e.g., status=COMPLETED)
  • output_type (string): Filter by type (e.g., output_type=float)

Examples:

  • filter=status=COMPLETED
  • filter=metric_name=latency AND status=COMPLETED
  • filter=output_type=float
page_size
integer
default:50

Maximum number of metrics to return (1-1000)

Required range: 1 <= x <= 1000
page_token
string

Pagination token from previous response (for fetching next page)

order_by
string
default:metric_name

Field to order results by.

Supported fields:

  • metric_name (default): Sort by metric name alphabetically
  • create_time: Sort by creation time
  • start_time: Sort by computation start time
  • end_time: Sort by computation end time
  • value: Sort by metric value (float types only)

Prefix with - for descending order (e.g., -create_time)

Response

List of metrics

metrics
object[]
required

List of simplified metric outputs

next_page_token
string | null

Pagination token for next page (null if no more results)

Example:

"eyJvZmZzZXQiOiAxMDB9"