curl --request PUT \
--url 'https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY=' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY="
payload = {
"name": "<string>",
"description": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>'})
};
fetch('https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY=', 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.example.com/ai/{experiment_id}?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/ai/{experiment_id}?HAIQU_API_KEY="
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"context": "<string>",
"description": "",
"creation_date": "2023-11-07T05:31:56Z",
"tags": "",
"circuits_count": 0,
"jobs_count": 0,
"last_action_date": "2023-11-07T05:31:56Z",
"url": ""
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Experiment
Rename the current experiment and/or set its description.
Use this tool when the caller wants to rename an experiment or replace its description without changing the experiment identity. The request must include at least one mutable field, and names must remain unique within the authenticated user scope.
The description is the experiment’s report on the Dashboard: it is rendered as HTML
next to the experiment’s circuits, jobs and metrics, so use it to record what the
experiment does, how it is set up and what the results mean. Markup such as
<h2>, <p>, <ul> or <a> can be used to structure the report; plain
text is displayed as-is, without line breaks, unless it is wrapped in tags.
Each call replaces the previous description, so pass the full text you want shown.
When to Use:
- Call this to rename an experiment or replace its description (experiment report) while keeping the same experiment identity.
- Call this after retrieving the experiment when the user wants to refine the stored metadata.
Constraints:
- Only
nameanddescriptionare mutable through this route. - Names must remain unique within the authenticated user scope.
Notes:
- For agent-facing output, explicitly confirm which fields changed and
include the resulting
idandname. - The endpoint returns the updated
ContextExperimentModelrather than a status-only wrapper.
Args:
experiment_id: Opaque experiment identifier to update.
user: Authenticated user resolved from the API key.
data: Update payload containing name and/or description.
db: Active database session.
Returns: The updated experiment object.
Raises:
HTTPException: Raised with 404 when the experiment is not available
to the caller, or 409 when the requested new name already
exists in the same user scope.
curl --request PUT \
--url 'https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY=' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY="
payload = {
"name": "<string>",
"description": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>'})
};
fetch('https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY=', 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.example.com/ai/{experiment_id}?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/ai/{experiment_id}?HAIQU_API_KEY="
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/{experiment_id}?HAIQU_API_KEY=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"context": "<string>",
"description": "",
"creation_date": "2023-11-07T05:31:56Z",
"tags": "",
"circuits_count": 0,
"jobs_count": 0,
"last_action_date": "2023-11-07T05:31:56Z",
"url": ""
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
Define payload for MCP experiment update requests.
Attributes: name: New experiment name. description: New HTML-formatted experiment description.
Response
Successful Response
Represent an experiment with MCP-specific context metadata.
description and creation_date remain optional for compatibility
with legacy database rows.
Attributes:
description: Plain-text experiment description. Optional for legacy
rows that still store NULL.
creation_date: Experiment creation timestamp. Optional for legacy rows
that still store NULL.
context: Additional plain-text guidance for AI agents consuming the
experiment.
url: Dashboard URL for the experiment when available.