curl --request POST \
--url https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"parameters": {},
"simulation_settings": {}
}
'import requests
url = "https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions"
payload = {
"description": "<string>",
"parameters": {},
"simulation_settings": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({description: '<string>', parameters: {}, simulation_settings: {}})
};
fetch('https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions', 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/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions",
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([
'description' => '<string>',
'parameters' => [
],
'simulation_settings' => [
]
]),
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/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"parameters\": {},\n \"simulation_settings\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"parameters\": {},\n \"simulation_settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"parameters\": {},\n \"simulation_settings\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create a new version of a parameterized model
Save a copy of a parameterized model with some parameters changed.
Parameters cannot be edited in place, so this is how a model is revised: the
new version starts from the parent’s parameters with parameters applied on
top, and records the parent it came from. The parent is left unchanged, so
simulations that ran on it still point at the parameters they used. Scoped like
:func:update_parameterized_model.
summary=true returns metadata without parameter values or model config.
curl --request POST \
--url https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"parameters": {},
"simulation_settings": {}
}
'import requests
url = "https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions"
payload = {
"description": "<string>",
"parameters": {},
"simulation_settings": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({description: '<string>', parameters: {}, simulation_settings: {}})
};
fetch('https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions', 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/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions",
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([
'description' => '<string>',
'parameters' => [
],
'simulation_settings' => [
]
]),
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/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"parameters\": {},\n \"simulation_settings\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"parameters\": {},\n \"simulation_settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/cells/{cell_spec_id}/parameterized_models/{parameterized_model_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"parameters\": {},\n \"simulation_settings\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Query Parameters
Body
Request body for creating a new version of a parameterized model.
The new version keeps its parent's base model, cell specification, project and
family, whose name it carries. Its parameters are the parent's with
parameters applied on top.
Description of the new version. Defaults to the parent's.
Parameter values that differ from the parent's, keyed by parameter name. Parameters not listed keep the parent's value.
Simulation settings for the new version. Defaults to the parent's.
Response
Successful Response
Was this page helpful?