curl --request PATCH \
--url https://api.ionworks.com/experiment_templates/{template_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"protocol_config": {},
"parameters_schema": {},
"time_series_spec": {},
"metrics_spec": {},
"protocol_group_id": "<string>"
}
'import requests
url = "https://api.ionworks.com/experiment_templates/{template_id}"
payload = {
"name": "<string>",
"description": "<string>",
"protocol_config": {},
"parameters_schema": {},
"time_series_spec": {},
"metrics_spec": {},
"protocol_group_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
protocol_config: {},
parameters_schema: {},
time_series_spec: {},
metrics_spec: {},
protocol_group_id: '<string>'
})
};
fetch('https://api.ionworks.com/experiment_templates/{template_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.ionworks.com/experiment_templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'protocol_config' => [
],
'parameters_schema' => [
],
'time_series_spec' => [
],
'metrics_spec' => [
],
'protocol_group_id' => '<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.ionworks.com/experiment_templates/{template_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"protocol_config\": {},\n \"parameters_schema\": {},\n \"time_series_spec\": {},\n \"metrics_spec\": {},\n \"protocol_group_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.ionworks.com/experiment_templates/{template_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"protocol_config\": {},\n \"parameters_schema\": {},\n \"time_series_spec\": {},\n \"metrics_spec\": {},\n \"protocol_group_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/experiment_templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"protocol_config\": {},\n \"parameters_schema\": {},\n \"time_series_spec\": {},\n \"metrics_spec\": {},\n \"protocol_group_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"organization_id": "<string>",
"id": "<string>",
"description": "<string>",
"description_template": "<string>",
"protocol_config": {},
"parameters_schema": {},
"created_at": "<string>",
"updated_at": "<string>",
"plot_options": {},
"time_series_spec": {},
"metrics_spec": {},
"source_protocol": "<string>",
"created_by": "<string>",
"created_by_email": "<string>",
"project_id": "<string>",
"protocol_group_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Experiment Template
Update an experiment template’s name and/or description.
Only organization-owned templates can be updated (not system templates).
Parameters
template_id : str ID of the template to update. body : UpdateExperimentTemplateBody Fields to update.
Returns
ExperimentTemplate Updated experiment template.
curl --request PATCH \
--url https://api.ionworks.com/experiment_templates/{template_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"protocol_config": {},
"parameters_schema": {},
"time_series_spec": {},
"metrics_spec": {},
"protocol_group_id": "<string>"
}
'import requests
url = "https://api.ionworks.com/experiment_templates/{template_id}"
payload = {
"name": "<string>",
"description": "<string>",
"protocol_config": {},
"parameters_schema": {},
"time_series_spec": {},
"metrics_spec": {},
"protocol_group_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
protocol_config: {},
parameters_schema: {},
time_series_spec: {},
metrics_spec: {},
protocol_group_id: '<string>'
})
};
fetch('https://api.ionworks.com/experiment_templates/{template_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.ionworks.com/experiment_templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'protocol_config' => [
],
'parameters_schema' => [
],
'time_series_spec' => [
],
'metrics_spec' => [
],
'protocol_group_id' => '<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.ionworks.com/experiment_templates/{template_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"protocol_config\": {},\n \"parameters_schema\": {},\n \"time_series_spec\": {},\n \"metrics_spec\": {},\n \"protocol_group_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.ionworks.com/experiment_templates/{template_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"protocol_config\": {},\n \"parameters_schema\": {},\n \"time_series_spec\": {},\n \"metrics_spec\": {},\n \"protocol_group_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/experiment_templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"protocol_config\": {},\n \"parameters_schema\": {},\n \"time_series_spec\": {},\n \"metrics_spec\": {},\n \"protocol_group_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"organization_id": "<string>",
"id": "<string>",
"description": "<string>",
"description_template": "<string>",
"protocol_config": {},
"parameters_schema": {},
"created_at": "<string>",
"updated_at": "<string>",
"plot_options": {},
"time_series_spec": {},
"metrics_spec": {},
"source_protocol": "<string>",
"created_by": "<string>",
"created_by_email": "<string>",
"project_id": "<string>",
"protocol_group_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Body
Request body for updating an experiment template.
protocol_group_id is three-valued: omitted leaves the current group
alone, an id moves the protocol into that group, and an explicit null
ungroups it. The other fields keep their existing omitted-or-set semantics.
Response
Successful Response
Pydantic model for experiment template database entity.
Name of the template
ID of the organization that owns this template
Unique identifier for the template
Description of the template
Template string for generating user-facing descriptions with {{param}} placeholders
Protocol configuration (UCP format). Omitted from list responses by default; opt in via ?include=protocol_config.
Parameters schema defining what parameters this template accepts. Omitted from list responses by default; opt in via ?include=parameters_schema.
When the template was created
When the template was last updated
Plot configuration options organized by plot type (time_series, metrics)
Specification mapping time-series keys to calculation rules.
Specification mapping metric names to calculation rules.
Original protocol text as entered by the user
User ID of the user who created this template
Email of the user who created this template
ID of the project that owns this protocol. Every protocol reachable through the API is project-scoped; None only on unmigrated rows.
ID of the protocol group this protocol belongs to. Protocols sharing a group are related. None means ungrouped. The group is always in the same project as the protocol.
Was this page helpful?