curl --request GET \
--url https://api.cekura.ai/test_framework/v1/async-jobs/{job_id}/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/test_framework/v1/async-jobs/{job_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/v1/async-jobs/{job_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/async-jobs/{job_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/v1/async-jobs/{job_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/v1/async-jobs/{job_id}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/async-jobs/{job_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{
"job_type": "generate_scenarios",
"job_id": "<string>",
"status": "in_progress",
"agent_id": 123,
"total_scenarios": 123,
"completed_scenarios": 123,
"failed_scenarios": 123,
"scenarios_list": [
{}
],
"errors": [
"<unknown>"
],
"warnings": [
"<unknown>"
],
"session_id": 123,
"current_step": "<string>",
"questions": [
{}
],
"agent_message": "<string>"
}Wait for a Background Job
Check on a background job using the progress_id returned by the endpoint that started it. Waits up to wait seconds for the job to finish, then returns its current state; while status is in_progress, call again with the same id.
curl --request GET \
--url https://api.cekura.ai/test_framework/v1/async-jobs/{job_id}/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/test_framework/v1/async-jobs/{job_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/v1/async-jobs/{job_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/async-jobs/{job_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/v1/async-jobs/{job_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/v1/async-jobs/{job_id}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/async-jobs/{job_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{
"job_type": "generate_scenarios",
"job_id": "<string>",
"status": "in_progress",
"agent_id": 123,
"total_scenarios": 123,
"completed_scenarios": 123,
"failed_scenarios": 123,
"scenarios_list": [
{}
],
"errors": [
"<unknown>"
],
"warnings": [
"<unknown>"
],
"session_id": 123,
"current_step": "<string>",
"questions": [
{}
],
"agent_message": "<string>"
}Authorizations
API Key Authentication. It should be included in the header of each request.
Path Parameters
The progress_id returned by the endpoint that started the job.
Query Parameters
Seconds to wait for the job to finish. 0 returns immediately.
0 <= x <= 55Response
Current state of the job. Its fields depend on job_type.
- Evaluator generation
- Instruction generation
- Evaluator improvement
- Metric preview
- Metric generation
- Metric description
- Simplify metric prompt
- Evaluators from call logs
- Alert summary
Started by the generate-evaluators endpoint.
generate_scenarios The job id you polled.
in_progress: still running, call again with the same id. needs_clarification: waiting on your answer. completed, failed, cancelled: finished.
in_progress, needs_clarification, completed, failed, cancelled Evaluators generated so far.
Only while status is needs_clarification (dashboard sessions). Answer via the generate-clarify-answer endpoint, then poll the same id.
Only while status is needs_clarification.