curl --request POST \
--url https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone \
--header 'X-Maitai-Api-Key: <api-key>'import requests
url = "https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone"
headers = {"X-Maitai-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Maitai-Api-Key': '<api-key>'}};
fetch('https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone', 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.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Maitai-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.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Maitai-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.post("https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone")
.header("X-Maitai-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Maitai-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": "<unknown>"
}Clone unified test set
Full-clone a unified test set. Returns a job id (async).
Body: * new_test_set_name (str, required) — must be unique per (company_id, application_id). * new_test_set_description (str, optional) — defaults to source’s description.
Response: 202 Accepted with {job_id, status: "pending"}. The portal subscribes to the TEST_SET_JOB_PROGRESS websocket keyed on job_id and polls GET /api/v1/test-set-jobs/{job_id} as fallback. On completion the job’s result is the newly-cloned TestSet payload — same shape GET /api/v1/unified-test-sets/{id} returns.
Because the unified surface stores item payload inline, the clone is one SQL round-trip per phase (set + items+response_subs). Sample cloning isn’t offered for the unified family yet — add a sample_mode branch here when it lands.
curl --request POST \
--url https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone \
--header 'X-Maitai-Api-Key: <api-key>'import requests
url = "https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone"
headers = {"X-Maitai-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Maitai-Api-Key': '<api-key>'}};
fetch('https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone', 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.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Maitai-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.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Maitai-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.post("https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone")
.header("X-Maitai-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trymaitai.ai/api/v1/unified-test-sets/{test_set_id}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Maitai-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": "<unknown>"
}Was this page helpful?