Revisar un experimento antes del lanzamiento
curl --request POST \
--url https://api.zelto.ai/v1/experiments/preflight \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"armAVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"armBVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcomeMetricIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"primaryMetricId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stableRoutingConfirmed": true,
"description": "<string>",
"armAName": "<string>",
"armBName": "<string>",
"cohortFilters": [
{}
],
"assignmentUnit": {
"kind": "auto"
},
"expectedArmAPercent": 50,
"monitorGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"newMonitorGroupName": "<string>",
"notifications": {
"emails": [
"jsmith@example.com"
]
}
}
'import requests
url = "https://api.zelto.ai/v1/experiments/preflight"
payload = {
"name": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"armAVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"armBVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcomeMetricIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"primaryMetricId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stableRoutingConfirmed": True,
"description": "<string>",
"armAName": "<string>",
"armBName": "<string>",
"cohortFilters": [{}],
"assignmentUnit": { "kind": "auto" },
"expectedArmAPercent": 50,
"monitorGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"newMonitorGroupName": "<string>",
"notifications": { "emails": ["jsmith@example.com"] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
armAVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
armBVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
outcomeMetricIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
primaryMetricId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stableRoutingConfirmed: true,
description: '<string>',
armAName: '<string>',
armBName: '<string>',
cohortFilters: [{}],
assignmentUnit: {kind: 'auto'},
expectedArmAPercent: 50,
monitorGroupId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
newMonitorGroupName: '<string>',
notifications: {emails: ['jsmith@example.com']}
})
};
fetch('https://api.zelto.ai/v1/experiments/preflight', 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.zelto.ai/v1/experiments/preflight",
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([
'name' => '<string>',
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'armAVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'armBVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'outcomeMetricIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'primaryMetricId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'stableRoutingConfirmed' => true,
'description' => '<string>',
'armAName' => '<string>',
'armBName' => '<string>',
'cohortFilters' => [
[
]
],
'assignmentUnit' => [
'kind' => 'auto'
],
'expectedArmAPercent' => 50,
'monitorGroupId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'newMonitorGroupName' => '<string>',
'notifications' => [
'emails' => [
'jsmith@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.zelto.ai/v1/experiments/preflight"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armAVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armBVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"outcomeMetricIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"primaryMetricId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stableRoutingConfirmed\": true,\n \"description\": \"<string>\",\n \"armAName\": \"<string>\",\n \"armBName\": \"<string>\",\n \"cohortFilters\": [\n {}\n ],\n \"assignmentUnit\": {\n \"kind\": \"auto\"\n },\n \"expectedArmAPercent\": 50,\n \"monitorGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"newMonitorGroupName\": \"<string>\",\n \"notifications\": {\n \"emails\": [\n \"jsmith@example.com\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.zelto.ai/v1/experiments/preflight")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armAVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armBVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"outcomeMetricIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"primaryMetricId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stableRoutingConfirmed\": true,\n \"description\": \"<string>\",\n \"armAName\": \"<string>\",\n \"armBName\": \"<string>\",\n \"cohortFilters\": [\n {}\n ],\n \"assignmentUnit\": {\n \"kind\": \"auto\"\n },\n \"expectedArmAPercent\": 50,\n \"monitorGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"newMonitorGroupName\": \"<string>\",\n \"notifications\": {\n \"emails\": [\n \"jsmith@example.com\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zelto.ai/v1/experiments/preflight")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armAVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armBVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"outcomeMetricIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"primaryMetricId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stableRoutingConfirmed\": true,\n \"description\": \"<string>\",\n \"armAName\": \"<string>\",\n \"armBName\": \"<string>\",\n \"cohortFilters\": [\n {}\n ],\n \"assignmentUnit\": {\n \"kind\": \"auto\"\n },\n \"expectedArmAPercent\": 50,\n \"monitorGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"newMonitorGroupName\": \"<string>\",\n \"notifications\": {\n \"emails\": [\n \"jsmith@example.com\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Experimentos
Revisar un experimento antes del lanzamiento
Valida la definición fija y devuelve tráfico reciente, calidad de identidad, fuga y coste proyectado. Requiere Observability, la activación de Experimentos v2 y rol de propietario o administrador.
POST
/
v1
/
experiments
/
preflight
Revisar un experimento antes del lanzamiento
curl --request POST \
--url https://api.zelto.ai/v1/experiments/preflight \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"armAVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"armBVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcomeMetricIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"primaryMetricId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stableRoutingConfirmed": true,
"description": "<string>",
"armAName": "<string>",
"armBName": "<string>",
"cohortFilters": [
{}
],
"assignmentUnit": {
"kind": "auto"
},
"expectedArmAPercent": 50,
"monitorGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"newMonitorGroupName": "<string>",
"notifications": {
"emails": [
"jsmith@example.com"
]
}
}
'import requests
url = "https://api.zelto.ai/v1/experiments/preflight"
payload = {
"name": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"armAVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"armBVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcomeMetricIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"primaryMetricId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stableRoutingConfirmed": True,
"description": "<string>",
"armAName": "<string>",
"armBName": "<string>",
"cohortFilters": [{}],
"assignmentUnit": { "kind": "auto" },
"expectedArmAPercent": 50,
"monitorGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"newMonitorGroupName": "<string>",
"notifications": { "emails": ["jsmith@example.com"] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
armAVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
armBVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
outcomeMetricIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
primaryMetricId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stableRoutingConfirmed: true,
description: '<string>',
armAName: '<string>',
armBName: '<string>',
cohortFilters: [{}],
assignmentUnit: {kind: 'auto'},
expectedArmAPercent: 50,
monitorGroupId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
newMonitorGroupName: '<string>',
notifications: {emails: ['jsmith@example.com']}
})
};
fetch('https://api.zelto.ai/v1/experiments/preflight', 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.zelto.ai/v1/experiments/preflight",
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([
'name' => '<string>',
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'armAVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'armBVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'outcomeMetricIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'primaryMetricId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'stableRoutingConfirmed' => true,
'description' => '<string>',
'armAName' => '<string>',
'armBName' => '<string>',
'cohortFilters' => [
[
]
],
'assignmentUnit' => [
'kind' => 'auto'
],
'expectedArmAPercent' => 50,
'monitorGroupId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'newMonitorGroupName' => '<string>',
'notifications' => [
'emails' => [
'jsmith@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.zelto.ai/v1/experiments/preflight"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armAVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armBVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"outcomeMetricIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"primaryMetricId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stableRoutingConfirmed\": true,\n \"description\": \"<string>\",\n \"armAName\": \"<string>\",\n \"armBName\": \"<string>\",\n \"cohortFilters\": [\n {}\n ],\n \"assignmentUnit\": {\n \"kind\": \"auto\"\n },\n \"expectedArmAPercent\": 50,\n \"monitorGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"newMonitorGroupName\": \"<string>\",\n \"notifications\": {\n \"emails\": [\n \"jsmith@example.com\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.zelto.ai/v1/experiments/preflight")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armAVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armBVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"outcomeMetricIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"primaryMetricId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stableRoutingConfirmed\": true,\n \"description\": \"<string>\",\n \"armAName\": \"<string>\",\n \"armBName\": \"<string>\",\n \"cohortFilters\": [\n {}\n ],\n \"assignmentUnit\": {\n \"kind\": \"auto\"\n },\n \"expectedArmAPercent\": 50,\n \"monitorGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"newMonitorGroupName\": \"<string>\",\n \"notifications\": {\n \"emails\": [\n \"jsmith@example.com\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zelto.ai/v1/experiments/preflight")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armAVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"armBVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"outcomeMetricIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"primaryMetricId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stableRoutingConfirmed\": true,\n \"description\": \"<string>\",\n \"armAName\": \"<string>\",\n \"armBName\": \"<string>\",\n \"cohortFilters\": [\n {}\n ],\n \"assignmentUnit\": {\n \"kind\": \"auto\"\n },\n \"expectedArmAPercent\": 50,\n \"monitorGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"newMonitorGroupName\": \"<string>\",\n \"notifications\": {\n \"emails\": [\n \"jsmith@example.com\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Autorizaciones
Envía Authorization: Bearer YOUR_API_KEY. La clave corresponde a una sola organización.
Cuerpo
application/json
Required string length:
1 - 255Minimum array length:
1Confirma que el tráfico se asigna de forma consistente fuera de Zelto.
Maximum string length:
2000Maximum string length:
120Maximum string length:
120Maximum array length:
12- Option 1
- Option 2
Show child attributes
Show child attributes
Rango requerido:
1 <= x <= 99Reutiliza un grupo guardado de GET /v1/experiments/monitor-groups. outcomeMetricIds debe coincidir con sus metricIds actuales. No se combina con newMonitorGroupName.
Guarda outcomeMetricIds como grupo reutilizable de la organización al iniciar. No se combina con monitorGroupId.
Required string length:
1 - 255Show child attributes
Show child attributes
Respuesta
Resumen previo.

