curl --request GET \
--url https://api.cekura.ai/test_framework/v2/metrics/{id}/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/test_framework/v2/metrics/{id}/"
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/{id}/', 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/{id}/",
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/{id}/"
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/{id}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v2/metrics/{id}/")
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{
"name": "<string>",
"eval_type": "binary",
"id": 123,
"slug": "<string>",
"project": 123,
"agents": [
123
],
"description": "<string>",
"type": "basic",
"enum_values": "<unknown>",
"audio_enabled": true,
"prompt": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"overall_score": "<string>",
"total_score": "<string>",
"knowledge_base_files": "<string>",
"observability_enabled": true,
"simulation_enabled": true,
"sampling_enabled": true,
"alert_enabled": true,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"significant_change_alert_status": "enabled",
"significant_change_alert_direction": "",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"reviews": [
{
"metric": 123,
"id": 123,
"test_set": {
"agent": 123,
"id": 123,
"name": "<string>",
"transcript": "<string>",
"voice_recording_url": "<string>",
"call_end_reason": "<string>",
"duration": "<string>",
"source_model": "CallLog",
"source_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"expected_value": "<unknown>",
"actual_value": "<unknown>",
"explanation": "<unknown>",
"feedback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"window_size": 123,
"std_multiplier": 123,
"ewma_alpha": 123,
"add_to_new_agents": true,
"pending_optimisation_proposal": "<unknown>"
}{
"detail": "<string>"
}Get Metric
Retrieve a specific metric by ID or slug.
curl --request GET \
--url https://api.cekura.ai/test_framework/v2/metrics/{id}/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/test_framework/v2/metrics/{id}/"
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/{id}/', 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/{id}/",
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/{id}/"
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/{id}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v2/metrics/{id}/")
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{
"name": "<string>",
"eval_type": "binary",
"id": 123,
"slug": "<string>",
"project": 123,
"agents": [
123
],
"description": "<string>",
"type": "basic",
"enum_values": "<unknown>",
"audio_enabled": true,
"prompt": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"overall_score": "<string>",
"total_score": "<string>",
"knowledge_base_files": "<string>",
"observability_enabled": true,
"simulation_enabled": true,
"sampling_enabled": true,
"alert_enabled": true,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"significant_change_alert_status": "enabled",
"significant_change_alert_direction": "",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"reviews": [
{
"metric": 123,
"id": 123,
"test_set": {
"agent": 123,
"id": 123,
"name": "<string>",
"transcript": "<string>",
"voice_recording_url": "<string>",
"call_end_reason": "<string>",
"duration": "<string>",
"source_model": "CallLog",
"source_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"expected_value": "<unknown>",
"actual_value": "<unknown>",
"explanation": "<unknown>",
"feedback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"window_size": 123,
"std_multiplier": 123,
"ewma_alpha": 123,
"add_to_new_agents": true,
"pending_optimisation_proposal": "<unknown>"
}{
"detail": "<string>"
}Authorizations
API Key Authentication. It should be included in the header of each request.
Path Parameters
ID or Slug - Metric identifier. Can be either:
- Numeric ID (e.g.,
123) - Slug (e.g.,
latency_metric,customer_satisfaction)
Response
Name of the metric.
Example: "Customer Satisfaction" or "Appointment Booking"
255binary- Binarycontinuous_qualitative- Continuous Qualitativenumeric- Numericenum- Enum
binary, continuous_qualitative, numeric, enum URL-friendly unique identifier in snake_case format. Example: "customer_satisfaction_1562"
255Description of what the metric measures.
Example: "Measures how satisfied customers are with the service provided"
Type of metric
basic- Basic (Deprecated in favor of LLM Judge)custom_prompt- Custom Prompt ( Deprecated in favor of LLM Judge)custom_code- Custom Codellm_judge- LLM Judge
basic, custom_prompt, custom_code, llm_judge List of possible enum values for enum type metrics.
Example: ["satisfied", "unsatisfied"]
Whether this metric requires audio analysis.
Example: true or false
Evaluation prompt for the metric.
Example: "Evaluate customer satisfaction based on conversation"
always- Alwaysautomatic- Automaticcustom- Custom
always, automatic, custom Type of trigger evaluation: LLM judge or custom code.
Only used when evaluation_trigger is CUSTOM.
Example: "llm_judge" or "custom_code"
llm_judge- LLM Judgecustom_code- Custom Code
llm_judge, custom_code Evaluation trigger prompt for the metric.
Example: "Evaluate metric only if call ended reason is main-agent-ended-call"
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"
Priority assignment prompt for the metric.
Custom configuration parameters for specific metrics if metric supports it. Example:
- For Infrastructure issues
{
"infra_issues_timeout": 10
}
The overall score for this metric across all test sets
The total score for this metric
Knowledge base files associated with this metric
Enable this metric for observability.
Example: true or false
Enable this metric for simulations.
Example: true or false
Enable sampling for this metric using project-level sample rate
Enable alerts for this metric when it fails (value=false).
Only applicable to binary metrics (eval_type=binary).
For other metric types, use significant_change_alert_status instead.
Example: true or false
disabled- Alerts Disablednormal- Normal Alertssignificant_change- Significant Change Alerts
disabled, normal, significant_change Filters to apply before computing alerts (CallLogQueryFilter format)
Slack workspace to send alerts to
Override channel ID for this metric's alerts
255Alert status: enabled or disabled.
enabled- Enableddisabled- Disabled
enabled, disabled Alert direction: increase only, decrease only, or both (empty = both).
Example: "increase", "decrease", or "both"
- `` - Both (Increase and Decrease)
increase- Increase Onlydecrease- Decrease Only
, increase, decrease Predefined function name
Example: "get_latency" or "check_critical_deviations"
255Python custom code for the metric. Example:
_resul = True _explanation = None if "call_end_reason" in data and data["call_end_reason"] == "customer_satisfaction": _result = True _explanation = "Customer expressed satisfaction with service"
Vocera defined metric code for the metric.
Example: "7fd534f5"
255Reviews associated with the metric
Show child attributes
Show child attributes
Window size for rolling statistics calculation.
Example: 50
Standard deviation multiplier for threshold calculation.
Example: 2.0
Alpha value for exponentially weighted moving average (EWMA) calculation.
Example: 0.1
When enabled, this metric is automatically assigned to new agents created in the project.
Unsaved proposal from a metric-optimiser cron run. Shape: {description, evaluation_trigger, type, custom_code, score, baseline_score, cron_job_id, cron_job_name, proposed_at}.