Create a test set from a production call log
curl --request POST \
--url https://api.cekura.ai/test_framework/test-sets/create_from_call_log/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"call_log_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_call_log/"
payload = {
"call_log_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({
call_log_id: 123,
metrics: [{metric: 123, feedback: '', expected_value: '<unknown>'}],
project: 123,
name: ''
})
};
fetch('https://api.cekura.ai/test_framework/test-sets/create_from_call_log/', 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_call_log/",
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([
'call_log_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_call_log/"
payload := strings.NewReader("{\n \"call_log_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_call_log/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"call_log_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_call_log/")
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 \"call_log_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_model": "CallLog",
"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 Call Log
Create a test set from call log data
POST
/
test_framework
/
test-sets
/
create_from_call_log
/
Create a test set from a production call log
curl --request POST \
--url https://api.cekura.ai/test_framework/test-sets/create_from_call_log/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"call_log_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_call_log/"
payload = {
"call_log_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({
call_log_id: 123,
metrics: [{metric: 123, feedback: '', expected_value: '<unknown>'}],
project: 123,
name: ''
})
};
fetch('https://api.cekura.ai/test_framework/test-sets/create_from_call_log/', 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_call_log/",
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([
'call_log_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_call_log/"
payload := strings.NewReader("{\n \"call_log_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_call_log/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"call_log_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_call_log/")
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 \"call_log_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_model": "CallLog",
"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_keyoauth2supabase_session
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
200 - application/json
Full 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.