Update a scenario improvement session
curl --request PATCH \
--url https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{id}/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"title": "<string>",
"project": 123,
"scenario_ids": "<unknown>",
"conversation_history": "<unknown>",
"created_by": 123
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{id}/"
payload = {
"title": "<string>",
"project": 123,
"scenario_ids": "<unknown>",
"conversation_history": "<unknown>",
"created_by": 123
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
project: 123,
scenario_ids: '<unknown>',
conversation_history: '<unknown>',
created_by: 123
})
};
fetch('https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{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/v1/scenario-improvement-sessions/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'project' => 123,
'scenario_ids' => '<unknown>',
'conversation_history' => '<unknown>',
'created_by' => 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/scenario-improvement-sessions/{id}/"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"project\": 123,\n \"scenario_ids\": \"<unknown>\",\n \"conversation_history\": \"<unknown>\",\n \"created_by\": 123\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{id}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"project\": 123,\n \"scenario_ids\": \"<unknown>\",\n \"conversation_history\": \"<unknown>\",\n \"created_by\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"project\": 123,\n \"scenario_ids\": \"<unknown>\",\n \"conversation_history\": \"<unknown>\",\n \"created_by\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"title": "<string>",
"project": 123,
"scenario_ids": "<unknown>",
"conversation_history": "<unknown>",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": 123
}Improvement Sessions
Update Scenario Improvement Session
Patch a scenario-improvement session (e.g. update its name, status, or accumulated state).
PATCH
/
test_framework
/
v1
/
scenario-improvement-sessions
/
{id}
/
Update a scenario improvement session
curl --request PATCH \
--url https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{id}/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"title": "<string>",
"project": 123,
"scenario_ids": "<unknown>",
"conversation_history": "<unknown>",
"created_by": 123
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{id}/"
payload = {
"title": "<string>",
"project": 123,
"scenario_ids": "<unknown>",
"conversation_history": "<unknown>",
"created_by": 123
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
project: 123,
scenario_ids: '<unknown>',
conversation_history: '<unknown>',
created_by: 123
})
};
fetch('https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{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/v1/scenario-improvement-sessions/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'project' => 123,
'scenario_ids' => '<unknown>',
'conversation_history' => '<unknown>',
'created_by' => 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/scenario-improvement-sessions/{id}/"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"project\": 123,\n \"scenario_ids\": \"<unknown>\",\n \"conversation_history\": \"<unknown>\",\n \"created_by\": 123\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{id}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"project\": 123,\n \"scenario_ids\": \"<unknown>\",\n \"conversation_history\": \"<unknown>\",\n \"created_by\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/scenario-improvement-sessions/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"project\": 123,\n \"scenario_ids\": \"<unknown>\",\n \"conversation_history\": \"<unknown>\",\n \"created_by\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"title": "<string>",
"project": 123,
"scenario_ids": "<unknown>",
"conversation_history": "<unknown>",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": 123
}Authorizations
api_keyoauth2supabase_session
API Key Authentication. It should be included in the header of each request.
Path Parameters
A unique integer value identifying this scenario improvement session.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Title for the session (auto-generated from first user message)
Maximum string length:
255List of scenario IDs generated from this session
List of conversation items: [{role: 'user'|'assistant', content: str, timestamp: str, tool_calls: [...]}]
Current status of the improvement session
pending- Pendingin_progress- In Progresscompleted- Completedcancelled- Cancelledfailed- Failed
Available options:
pending, in_progress, completed, cancelled, failed Response
200 - application/json
Title for the session (auto-generated from first user message)
Maximum string length:
255List of scenario IDs generated from this session
List of conversation items: [{role: 'user'|'assistant', content: str, timestamp: str, tool_calls: [...]}]
Current status of the improvement session
pending- Pendingin_progress- In Progresscompleted- Completedcancelled- Cancelledfailed- Failed
Available options:
pending, in_progress, completed, cancelled, failed