CreateExperimentAPI mirrors erdo_create_experiment.
curl --request POST \
--url https://api.erdo.ai/v1/experiments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"decision_rule_markdown": "<string>",
"evidence_datasets": [
{
"dataset_slug": "<string>",
"role": "<string>"
}
],
"guardrail_metrics": [
"<string>"
],
"hypothesis_markdown": "<string>",
"primary_metric": "<string>",
"project_slug": "<string>",
"scope": "<string>",
"slug": "<string>",
"title": "<string>",
"variants": [
{
"allocation_percent": -1,
"is_control": true,
"key": "<string>",
"label": "<string>",
"treatment_class": "<string>",
"treatment_resource_id": "<string>",
"treatment_resource_type": "<string>",
"treatment_url": "<string>"
}
],
"workstream_slug": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/experiments"
payload = {
"decision_rule_markdown": "<string>",
"evidence_datasets": [
{
"dataset_slug": "<string>",
"role": "<string>"
}
],
"guardrail_metrics": ["<string>"],
"hypothesis_markdown": "<string>",
"primary_metric": "<string>",
"project_slug": "<string>",
"scope": "<string>",
"slug": "<string>",
"title": "<string>",
"variants": [
{
"allocation_percent": -1,
"is_control": True,
"key": "<string>",
"label": "<string>",
"treatment_class": "<string>",
"treatment_resource_id": "<string>",
"treatment_resource_type": "<string>",
"treatment_url": "<string>"
}
],
"workstream_slug": "<string>"
}
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({
decision_rule_markdown: '<string>',
evidence_datasets: [{dataset_slug: '<string>', role: '<string>'}],
guardrail_metrics: ['<string>'],
hypothesis_markdown: '<string>',
primary_metric: '<string>',
project_slug: '<string>',
scope: '<string>',
slug: '<string>',
title: '<string>',
variants: [
{
allocation_percent: -1,
is_control: true,
key: '<string>',
label: '<string>',
treatment_class: '<string>',
treatment_resource_id: '<string>',
treatment_resource_type: '<string>',
treatment_url: '<string>'
}
],
workstream_slug: '<string>'
})
};
fetch('https://api.erdo.ai/v1/experiments', 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.erdo.ai/v1/experiments",
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([
'decision_rule_markdown' => '<string>',
'evidence_datasets' => [
[
'dataset_slug' => '<string>',
'role' => '<string>'
]
],
'guardrail_metrics' => [
'<string>'
],
'hypothesis_markdown' => '<string>',
'primary_metric' => '<string>',
'project_slug' => '<string>',
'scope' => '<string>',
'slug' => '<string>',
'title' => '<string>',
'variants' => [
[
'allocation_percent' => -1,
'is_control' => true,
'key' => '<string>',
'label' => '<string>',
'treatment_class' => '<string>',
'treatment_resource_id' => '<string>',
'treatment_resource_type' => '<string>',
'treatment_url' => '<string>'
]
],
'workstream_slug' => '<string>'
]),
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.erdo.ai/v1/experiments"
payload := strings.NewReader("{\n \"decision_rule_markdown\": \"<string>\",\n \"evidence_datasets\": [\n {\n \"dataset_slug\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"guardrail_metrics\": [\n \"<string>\"\n ],\n \"hypothesis_markdown\": \"<string>\",\n \"primary_metric\": \"<string>\",\n \"project_slug\": \"<string>\",\n \"scope\": \"<string>\",\n \"slug\": \"<string>\",\n \"title\": \"<string>\",\n \"variants\": [\n {\n \"allocation_percent\": -1,\n \"is_control\": true,\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"treatment_class\": \"<string>\",\n \"treatment_resource_id\": \"<string>\",\n \"treatment_resource_type\": \"<string>\",\n \"treatment_url\": \"<string>\"\n }\n ],\n \"workstream_slug\": \"<string>\"\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.erdo.ai/v1/experiments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decision_rule_markdown\": \"<string>\",\n \"evidence_datasets\": [\n {\n \"dataset_slug\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"guardrail_metrics\": [\n \"<string>\"\n ],\n \"hypothesis_markdown\": \"<string>\",\n \"primary_metric\": \"<string>\",\n \"project_slug\": \"<string>\",\n \"scope\": \"<string>\",\n \"slug\": \"<string>\",\n \"title\": \"<string>\",\n \"variants\": [\n {\n \"allocation_percent\": -1,\n \"is_control\": true,\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"treatment_class\": \"<string>\",\n \"treatment_resource_id\": \"<string>\",\n \"treatment_resource_type\": \"<string>\",\n \"treatment_url\": \"<string>\"\n }\n ],\n \"workstream_slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/experiments")
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 \"decision_rule_markdown\": \"<string>\",\n \"evidence_datasets\": [\n {\n \"dataset_slug\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"guardrail_metrics\": [\n \"<string>\"\n ],\n \"hypothesis_markdown\": \"<string>\",\n \"primary_metric\": \"<string>\",\n \"project_slug\": \"<string>\",\n \"scope\": \"<string>\",\n \"slug\": \"<string>\",\n \"title\": \"<string>\",\n \"variants\": [\n {\n \"allocation_percent\": -1,\n \"is_control\": true,\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"treatment_class\": \"<string>\",\n \"treatment_resource_id\": \"<string>\",\n \"treatment_resource_type\": \"<string>\",\n \"treatment_url\": \"<string>\"\n }\n ],\n \"workstream_slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"evidence_datasets": [
{
"created_at": "2023-11-07T05:31:56Z",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_slug": "<string>",
"experiment_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"experiment_run": {
"created_at": "2023-11-07T05:31:56Z",
"decided_at": "2023-11-07T05:31:56Z",
"decision": "<string>",
"decision_rule_markdown": "<string>",
"guardrail_metrics": [
"<string>"
],
"hypothesis_markdown": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome_markdown": "<string>",
"primary_metric": "<string>",
"primary_thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "<string>",
"slug": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"workstream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"policy_state": {
"calibration_pairs": 123,
"calibration_z_test_passed": true,
"decision_reason": "<string>",
"effects": [
{
"augmented_ci_high": 123,
"augmented_ci_low": 123,
"augmented_effect": 123,
"naive_ci_high": 123,
"naive_ci_low": 123,
"naive_effect": 123,
"variant_key": "<string>"
}
],
"large_step": true,
"primary_metric": "<string>",
"prior_pseudo_sessions": 123,
"recommended_decision": "<string>",
"recommended_variant": "<string>",
"stepped_at": "2023-11-07T05:31:56Z",
"total_movement": 123,
"variants": [
{
"allocation": 123,
"expected_loss": 123,
"guardrail_veto": true,
"is_control": true,
"key": "<string>",
"kill_eligible": true,
"posterior_alpha": 123,
"posterior_beta": 123,
"posterior_mean_rate": 123,
"predicted_rate": 123,
"prob_beat_control": 123,
"ship_eligible": true,
"stopped": true,
"successes": 123,
"trials": 123,
"win_frequency": 123
}
]
},
"variants": [
{
"allocation_percent": -1,
"created_at": "2023-11-07T05:31:56Z",
"experiment_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_control": true,
"key": "<string>",
"label": "<string>",
"treatment_class": "<string>",
"treatment_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"treatment_resource_type": "<string>",
"treatment_url": "<string>"
}
]
}{
"code": "not_found",
"details": {},
"message": "<string>"
}API Reference
CreateExperimentAPI mirrors erdo_create_experiment.
POST
/
v1
/
experiments
CreateExperimentAPI mirrors erdo_create_experiment.
curl --request POST \
--url https://api.erdo.ai/v1/experiments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"decision_rule_markdown": "<string>",
"evidence_datasets": [
{
"dataset_slug": "<string>",
"role": "<string>"
}
],
"guardrail_metrics": [
"<string>"
],
"hypothesis_markdown": "<string>",
"primary_metric": "<string>",
"project_slug": "<string>",
"scope": "<string>",
"slug": "<string>",
"title": "<string>",
"variants": [
{
"allocation_percent": -1,
"is_control": true,
"key": "<string>",
"label": "<string>",
"treatment_class": "<string>",
"treatment_resource_id": "<string>",
"treatment_resource_type": "<string>",
"treatment_url": "<string>"
}
],
"workstream_slug": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/experiments"
payload = {
"decision_rule_markdown": "<string>",
"evidence_datasets": [
{
"dataset_slug": "<string>",
"role": "<string>"
}
],
"guardrail_metrics": ["<string>"],
"hypothesis_markdown": "<string>",
"primary_metric": "<string>",
"project_slug": "<string>",
"scope": "<string>",
"slug": "<string>",
"title": "<string>",
"variants": [
{
"allocation_percent": -1,
"is_control": True,
"key": "<string>",
"label": "<string>",
"treatment_class": "<string>",
"treatment_resource_id": "<string>",
"treatment_resource_type": "<string>",
"treatment_url": "<string>"
}
],
"workstream_slug": "<string>"
}
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({
decision_rule_markdown: '<string>',
evidence_datasets: [{dataset_slug: '<string>', role: '<string>'}],
guardrail_metrics: ['<string>'],
hypothesis_markdown: '<string>',
primary_metric: '<string>',
project_slug: '<string>',
scope: '<string>',
slug: '<string>',
title: '<string>',
variants: [
{
allocation_percent: -1,
is_control: true,
key: '<string>',
label: '<string>',
treatment_class: '<string>',
treatment_resource_id: '<string>',
treatment_resource_type: '<string>',
treatment_url: '<string>'
}
],
workstream_slug: '<string>'
})
};
fetch('https://api.erdo.ai/v1/experiments', 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.erdo.ai/v1/experiments",
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([
'decision_rule_markdown' => '<string>',
'evidence_datasets' => [
[
'dataset_slug' => '<string>',
'role' => '<string>'
]
],
'guardrail_metrics' => [
'<string>'
],
'hypothesis_markdown' => '<string>',
'primary_metric' => '<string>',
'project_slug' => '<string>',
'scope' => '<string>',
'slug' => '<string>',
'title' => '<string>',
'variants' => [
[
'allocation_percent' => -1,
'is_control' => true,
'key' => '<string>',
'label' => '<string>',
'treatment_class' => '<string>',
'treatment_resource_id' => '<string>',
'treatment_resource_type' => '<string>',
'treatment_url' => '<string>'
]
],
'workstream_slug' => '<string>'
]),
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.erdo.ai/v1/experiments"
payload := strings.NewReader("{\n \"decision_rule_markdown\": \"<string>\",\n \"evidence_datasets\": [\n {\n \"dataset_slug\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"guardrail_metrics\": [\n \"<string>\"\n ],\n \"hypothesis_markdown\": \"<string>\",\n \"primary_metric\": \"<string>\",\n \"project_slug\": \"<string>\",\n \"scope\": \"<string>\",\n \"slug\": \"<string>\",\n \"title\": \"<string>\",\n \"variants\": [\n {\n \"allocation_percent\": -1,\n \"is_control\": true,\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"treatment_class\": \"<string>\",\n \"treatment_resource_id\": \"<string>\",\n \"treatment_resource_type\": \"<string>\",\n \"treatment_url\": \"<string>\"\n }\n ],\n \"workstream_slug\": \"<string>\"\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.erdo.ai/v1/experiments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decision_rule_markdown\": \"<string>\",\n \"evidence_datasets\": [\n {\n \"dataset_slug\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"guardrail_metrics\": [\n \"<string>\"\n ],\n \"hypothesis_markdown\": \"<string>\",\n \"primary_metric\": \"<string>\",\n \"project_slug\": \"<string>\",\n \"scope\": \"<string>\",\n \"slug\": \"<string>\",\n \"title\": \"<string>\",\n \"variants\": [\n {\n \"allocation_percent\": -1,\n \"is_control\": true,\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"treatment_class\": \"<string>\",\n \"treatment_resource_id\": \"<string>\",\n \"treatment_resource_type\": \"<string>\",\n \"treatment_url\": \"<string>\"\n }\n ],\n \"workstream_slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/experiments")
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 \"decision_rule_markdown\": \"<string>\",\n \"evidence_datasets\": [\n {\n \"dataset_slug\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"guardrail_metrics\": [\n \"<string>\"\n ],\n \"hypothesis_markdown\": \"<string>\",\n \"primary_metric\": \"<string>\",\n \"project_slug\": \"<string>\",\n \"scope\": \"<string>\",\n \"slug\": \"<string>\",\n \"title\": \"<string>\",\n \"variants\": [\n {\n \"allocation_percent\": -1,\n \"is_control\": true,\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"treatment_class\": \"<string>\",\n \"treatment_resource_id\": \"<string>\",\n \"treatment_resource_type\": \"<string>\",\n \"treatment_url\": \"<string>\"\n }\n ],\n \"workstream_slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"evidence_datasets": [
{
"created_at": "2023-11-07T05:31:56Z",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_slug": "<string>",
"experiment_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"experiment_run": {
"created_at": "2023-11-07T05:31:56Z",
"decided_at": "2023-11-07T05:31:56Z",
"decision": "<string>",
"decision_rule_markdown": "<string>",
"guardrail_metrics": [
"<string>"
],
"hypothesis_markdown": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome_markdown": "<string>",
"primary_metric": "<string>",
"primary_thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "<string>",
"slug": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"workstream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"policy_state": {
"calibration_pairs": 123,
"calibration_z_test_passed": true,
"decision_reason": "<string>",
"effects": [
{
"augmented_ci_high": 123,
"augmented_ci_low": 123,
"augmented_effect": 123,
"naive_ci_high": 123,
"naive_ci_low": 123,
"naive_effect": 123,
"variant_key": "<string>"
}
],
"large_step": true,
"primary_metric": "<string>",
"prior_pseudo_sessions": 123,
"recommended_decision": "<string>",
"recommended_variant": "<string>",
"stepped_at": "2023-11-07T05:31:56Z",
"total_movement": 123,
"variants": [
{
"allocation": 123,
"expected_loss": 123,
"guardrail_veto": true,
"is_control": true,
"key": "<string>",
"kill_eligible": true,
"posterior_alpha": 123,
"posterior_beta": 123,
"posterior_mean_rate": 123,
"predicted_rate": 123,
"prob_beat_control": 123,
"ship_eligible": true,
"stopped": true,
"successes": 123,
"trials": 123,
"win_frequency": 123
}
]
},
"variants": [
{
"allocation_percent": -1,
"created_at": "2023-11-07T05:31:56Z",
"experiment_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_control": true,
"key": "<string>",
"label": "<string>",
"treatment_class": "<string>",
"treatment_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"treatment_resource_type": "<string>",
"treatment_url": "<string>"
}
]
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).
Body
application/json
Response
Success response
evidence_datasets
ExperimentEvidenceDataset binds an experiment to a measurement dataset.
· object[]
Show child attributes
Show child attributes
Sibling to Workstream, can be hosted by a workstream or standalone.
Show child attributes
Show child attributes
experiment: what it believes about each variant, how it split the traffic, and where each variant sits against the stop thresholds. It is READ from the last allocation_step (action_taken) and posterior_stop (decision_check) observations the policy wrote — never recomputed on read.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
ListExperimentsAPI mirrors erdo_list_experiments.
GetExperimentAPI mirrors erdo_get_experiment (slug or uuid).
⌘I

