List quality metrics
curl --request GET \
--url https://api.cekura.ai/test_framework/v2/metrics/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/test_framework/v2/metrics/"
headers = {"X-CEKURA-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-CEKURA-API-KEY': '<api-key>'}};
fetch('https://api.cekura.ai/test_framework/v2/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.cekura.ai/test_framework/v2/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-CEKURA-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.cekura.ai/test_framework/v2/metrics/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CEKURA-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.cekura.ai/test_framework/v2/metrics/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v2/metrics/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 123,
"name": "<string>",
"description": "<string>",
"function_name": "<string>",
"type": "basic",
"eval_type": "binary",
"enum_values": [
"<string>"
],
"audio_enabled": true,
"observability_enabled": true,
"simulation_enabled": true,
"prompt": "<string>",
"evaluation_trigger": "always",
"evaluation_trigger_prompt": "<string>",
"priority_assignment_prompt": "<string>",
"vocera_defined_metric_code": "<string>",
"configuration": {
"infra_issues_timeout": "<integer>",
"key": "value"
},
"kb_file_ids": [
"<integer>"
],
"knowledge_base_files": [
{
"id": "<integer>",
"agent": "<integer>",
"file_url": "<string>",
"file_name": "<string>",
"file_type": "<string>",
"file_size": "<integer>",
"created_at": "<datetime>",
"updated_at": "<datetime>"
}
],
"metric_cost": "<float>"
}
]Metrics
List Metrics
List quality metrics. Filter by project_id or agent_id to scope results.
GET
/
test_framework
/
v2
/
metrics
/
List quality metrics
curl --request GET \
--url https://api.cekura.ai/test_framework/v2/metrics/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/test_framework/v2/metrics/"
headers = {"X-CEKURA-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-CEKURA-API-KEY': '<api-key>'}};
fetch('https://api.cekura.ai/test_framework/v2/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.cekura.ai/test_framework/v2/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-CEKURA-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.cekura.ai/test_framework/v2/metrics/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CEKURA-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.cekura.ai/test_framework/v2/metrics/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v2/metrics/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 123,
"name": "<string>",
"description": "<string>",
"function_name": "<string>",
"type": "basic",
"eval_type": "binary",
"enum_values": [
"<string>"
],
"audio_enabled": true,
"observability_enabled": true,
"simulation_enabled": true,
"prompt": "<string>",
"evaluation_trigger": "always",
"evaluation_trigger_prompt": "<string>",
"priority_assignment_prompt": "<string>",
"vocera_defined_metric_code": "<string>",
"configuration": {
"infra_issues_timeout": "<integer>",
"key": "value"
},
"kb_file_ids": [
"<integer>"
],
"knowledge_base_files": [
{
"id": "<integer>",
"agent": "<integer>",
"file_url": "<string>",
"file_name": "<string>",
"file_type": "<string>",
"file_size": "<integer>",
"created_at": "<datetime>",
"updated_at": "<datetime>"
}
],
"metric_cost": "<float>"
}
]Authorizations
api_keyoauth2embedded_sessionsupabase_session
Query Parameters
Response
200 - application/json
Python custom code to determine metric relevance. Code should set _result (bool) and _explanation (str). Example:
_result = True _explanation = "Metric is relevant" if "call_end_reason" in data and data["call_end_reason"] == "customer-hung-up": _result = False _explanation = "Customer hung up, metric not applicable"