Create a test set from a previous test run
curl --request POST \
--url https://api.cekura.ai/test_framework/test-sets/create_from_run/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"run_id": 123,
"metrics": [
{
"metric": 123,
"feedback": "",
"expected_value": "<unknown>"
}
],
"project": 123,
"name": ""
}
'import requests
url = "https://api.cekura.ai/test_framework/test-sets/create_from_run/"
payload = {
"run_id": 123,
"metrics": [
{
"metric": 123,
"feedback": "",
"expected_value": "<unknown>"
}
],
"project": 123,
"name": ""
}
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_id: 123,
metrics: [{metric: 123, feedback: '', expected_value: '<unknown>'}],
project: 123,
name: ''
})
};
fetch('https://api.cekura.ai/test_framework/test-sets/create_from_run/', 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/test-sets/create_from_run/",
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_id' => 123,
'metrics' => [
[
'metric' => 123,
'feedback' => '',
'expected_value' => '<unknown>'
]
],
'project' => 123,
'name' => ''
]),
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/test-sets/create_from_run/"
payload := strings.NewReader("{\n \"run_id\": 123,\n \"metrics\": [\n {\n \"metric\": 123,\n \"feedback\": \"\",\n \"expected_value\": \"<unknown>\"\n }\n ],\n \"project\": 123,\n \"name\": \"\"\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/test-sets/create_from_run/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"run_id\": 123,\n \"metrics\": [\n {\n \"metric\": 123,\n \"feedback\": \"\",\n \"expected_value\": \"<unknown>\"\n }\n ],\n \"project\": 123,\n \"name\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/test-sets/create_from_run/")
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_id\": 123,\n \"metrics\": [\n {\n \"metric\": 123,\n \"feedback\": \"\",\n \"expected_value\": \"<unknown>\"\n }\n ],\n \"project\": 123,\n \"name\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"agent": 123,
"id": 123,
"name": "<string>",
"transcript": "<string>",
"transcript_object": null,
"voice_recording_url": "<string>",
"call_end_reason": "<string>",
"duration": "<string>",
"source_id": "<string>",
"metric_reviews": [
{
"id": 123,
"metric": 123,
"metric_name": "<string>",
"metric_enum_values": "<unknown>",
"eval_type": "<string>",
"expected_value": "<unknown>",
"explanation": "<unknown>",
"feedback": "<string>",
"metric_function_name": "<string>",
"metric_vocera_defined_metric_code": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Labs
Create Test Set from Run
Create a test set from test run data
POST
/
test_framework
/
test-sets
/
create_from_run
/
Create a test set from a previous test run
curl --request POST \
--url https://api.cekura.ai/test_framework/test-sets/create_from_run/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"run_id": 123,
"metrics": [
{
"metric": 123,
"feedback": "",
"expected_value": "<unknown>"
}
],
"project": 123,
"name": ""
}
'import requests
url = "https://api.cekura.ai/test_framework/test-sets/create_from_run/"
payload = {
"run_id": 123,
"metrics": [
{
"metric": 123,
"feedback": "",
"expected_value": "<unknown>"
}
],
"project": 123,
"name": ""
}
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_id: 123,
metrics: [{metric: 123, feedback: '', expected_value: '<unknown>'}],
project: 123,
name: ''
})
};
fetch('https://api.cekura.ai/test_framework/test-sets/create_from_run/', 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/test-sets/create_from_run/",
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_id' => 123,
'metrics' => [
[
'metric' => 123,
'feedback' => '',
'expected_value' => '<unknown>'
]
],
'project' => 123,
'name' => ''
]),
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/test-sets/create_from_run/"
payload := strings.NewReader("{\n \"run_id\": 123,\n \"metrics\": [\n {\n \"metric\": 123,\n \"feedback\": \"\",\n \"expected_value\": \"<unknown>\"\n }\n ],\n \"project\": 123,\n \"name\": \"\"\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/test-sets/create_from_run/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"run_id\": 123,\n \"metrics\": [\n {\n \"metric\": 123,\n \"feedback\": \"\",\n \"expected_value\": \"<unknown>\"\n }\n ],\n \"project\": 123,\n \"name\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/test-sets/create_from_run/")
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_id\": 123,\n \"metrics\": [\n {\n \"metric\": 123,\n \"feedback\": \"\",\n \"expected_value\": \"<unknown>\"\n }\n ],\n \"project\": 123,\n \"name\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"agent": 123,
"id": 123,
"name": "<string>",
"transcript": "<string>",
"transcript_object": null,
"voice_recording_url": "<string>",
"call_end_reason": "<string>",
"duration": "<string>",
"source_id": "<string>",
"metric_reviews": [
{
"id": 123,
"metric": 123,
"metric_name": "<string>",
"metric_enum_values": "<unknown>",
"eval_type": "<string>",
"expected_value": "<unknown>",
"explanation": "<unknown>",
"feedback": "<string>",
"metric_function_name": "<string>",
"metric_vocera_defined_metric_code": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
API Key Authentication. It should be included in the header of each request.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
ID of the run to create test set from
List of metrics with optional notes to include in the test set
Show child attributes
Show child attributes
ID of the project that owns the run
Optional name for the test set. If not provided, run ID will be used
Response
200 - application/json
Name of the test set
Example: "Test Set 1"
Maximum string length:
255Full text transcript of the call. Example:
[00:01] Testing Agent: Hello.
[00:02] Main Agent: Hello, how can I help you today?
[00:03] Testing Agent: Well, I mean, sure. What time exactly are we talking about here
[00:04] Main Agent: 6 PM.
[00:05] Testing Agent: Great. I'll book that for you. Just a sec.
[00:06] Main Agent: Okay.
Audio URL
Reason why the call ended. Example:
"customer-ended-call""agent-ended-call"
Maximum string length:
255Call duration in minutes in MM:SS format.
Example: 01:10
CallLog- Call LogRun- Run
Available options:
CallLog, Run Show child attributes
Show child attributes
When this record was created.
Example: 2024-03-15T10:30:45Z
When this record was last updated.
Example: 2024-03-15T10:35:11Z
⌘I