cURL
curl --request POST \
--url https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"run_ids": [
123
],
"metric_ids": [
123
]
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/"
payload = {
"run_ids": [123],
"metric_ids": [123]
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({run_ids: [123], metric_ids: [123]})
};
fetch('https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_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/v1/results/{id}/evaluate_metrics/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'run_ids' => [
123
],
'metric_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/"
payload := strings.NewReader("{\n \"run_ids\": [\n 123\n ],\n \"metric_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"run_ids\": [\n 123\n ],\n \"metric_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"run_ids\": [\n 123\n ],\n \"metric_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": 123,
"agent": 123,
"agent_name": "<string>",
"agent_inbound": true,
"status": "pending",
"success_rate": 0,
"run_as_text": false,
"is_cronjob": "<string>",
"created_via": "<string>",
"created_by": {
"name": "<string>",
"id": 123,
"email": "jsmith@example.com"
},
"api_key": {
"id": 123,
"name": "<string>",
"created_by": {
"name": "<string>",
"id": 123,
"email": "jsmith@example.com"
}
},
"runs": {},
"met_expected_outcome_count": "<string>",
"total_expected_outcome_count": "<string>",
"total_runs_count": "<string>",
"completed_runs_count": "<string>",
"success_runs_count": "<string>",
"failed_runs_count": "<string>",
"scenarios": {},
"run_type": "<string>",
"agent_version": {
"history_id": 123,
"version_id": "<string>",
"version_name": "<string>",
"is_current": true
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Results
Reevaluate Metrics
Evaluate metrics against result transcripts
POST
/
test_framework
/
v1
/
results
/
{id}
/
evaluate_metrics
/
cURL
curl --request POST \
--url https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"run_ids": [
123
],
"metric_ids": [
123
]
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/"
payload = {
"run_ids": [123],
"metric_ids": [123]
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({run_ids: [123], metric_ids: [123]})
};
fetch('https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_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/v1/results/{id}/evaluate_metrics/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'run_ids' => [
123
],
'metric_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/"
payload := strings.NewReader("{\n \"run_ids\": [\n 123\n ],\n \"metric_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"run_ids\": [\n 123\n ],\n \"metric_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/results/{id}/evaluate_metrics/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"run_ids\": [\n 123\n ],\n \"metric_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": 123,
"agent": 123,
"agent_name": "<string>",
"agent_inbound": true,
"status": "pending",
"success_rate": 0,
"run_as_text": false,
"is_cronjob": "<string>",
"created_via": "<string>",
"created_by": {
"name": "<string>",
"id": 123,
"email": "jsmith@example.com"
},
"api_key": {
"id": 123,
"name": "<string>",
"created_by": {
"name": "<string>",
"id": 123,
"email": "jsmith@example.com"
}
},
"runs": {},
"met_expected_outcome_count": "<string>",
"total_expected_outcome_count": "<string>",
"total_runs_count": "<string>",
"completed_runs_count": "<string>",
"success_runs_count": "<string>",
"failed_runs_count": "<string>",
"scenarios": {},
"run_type": "<string>",
"agent_version": {
"history_id": 123,
"version_id": "<string>",
"version_name": "<string>",
"is_current": true
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
api_keyoauth2embedded_sessionshareable_linksupabase_session
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
200 - application/json
Current status of the result
running- Runningcompleted- Completedfailed- Failedpending- Pendingin_progress- In Progressevaluating- Evaluatingin_queue- In Queuetimeout- Timeoutcancelled- Cancelledscaling_up- Scaling Up
Available options:
running, completed, failed, pending, in_progress, evaluating, in_queue, timeout, cancelled, scaling_up