Save To Project
curl --request POST \
--url https://api.ionworks.com/ecm/save-to-project \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"cell_spec_id": "<string>",
"num_rcs": 2,
"fit_results": {
"soc": [
123
],
"ocv": [
123
],
"r0": [
123
],
"rc_pairs": [
{
"r": [
123
],
"c": [
123
],
"tau": [
123
]
}
],
"capacity_Ah": [
123
]
},
"description": ""
}
'import requests
url = "https://api.ionworks.com/ecm/save-to-project"
payload = {
"name": "<string>",
"cell_spec_id": "<string>",
"num_rcs": 2,
"fit_results": {
"soc": [123],
"ocv": [123],
"r0": [123],
"rc_pairs": [
{
"r": [123],
"c": [123],
"tau": [123]
}
],
"capacity_Ah": [123]
},
"description": ""
}
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({
name: '<string>',
cell_spec_id: '<string>',
num_rcs: 2,
fit_results: {
soc: [123],
ocv: [123],
r0: [123],
rc_pairs: [{r: [123], c: [123], tau: [123]}],
capacity_Ah: [123]
},
description: ''
})
};
fetch('https://api.ionworks.com/ecm/save-to-project', 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/ecm/save-to-project",
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>',
'cell_spec_id' => '<string>',
'num_rcs' => 2,
'fit_results' => [
'soc' => [
123
],
'ocv' => [
123
],
'r0' => [
123
],
'rc_pairs' => [
[
'r' => [
123
],
'c' => [
123
],
'tau' => [
123
]
]
],
'capacity_Ah' => [
123
]
],
'description' => ''
]),
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/ecm/save-to-project"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"cell_spec_id\": \"<string>\",\n \"num_rcs\": 2,\n \"fit_results\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ],\n \"r0\": [\n 123\n ],\n \"rc_pairs\": [\n {\n \"r\": [\n 123\n ],\n \"c\": [\n 123\n ],\n \"tau\": [\n 123\n ]\n }\n ],\n \"capacity_Ah\": [\n 123\n ]\n },\n \"description\": \"\"\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/ecm/save-to-project")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"cell_spec_id\": \"<string>\",\n \"num_rcs\": 2,\n \"fit_results\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ],\n \"r0\": [\n 123\n ],\n \"rc_pairs\": [\n {\n \"r\": [\n 123\n ],\n \"c\": [\n 123\n ],\n \"tau\": [\n 123\n ]\n }\n ],\n \"capacity_Ah\": [\n 123\n ]\n },\n \"description\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/ecm/save-to-project")
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 \"name\": \"<string>\",\n \"cell_spec_id\": \"<string>\",\n \"num_rcs\": 2,\n \"fit_results\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ],\n \"r0\": [\n 123\n ],\n \"rc_pairs\": [\n {\n \"r\": [\n 123\n ],\n \"c\": [\n 123\n ],\n \"tau\": [\n 123\n ]\n }\n ],\n \"capacity_Ah\": [\n 123\n ]\n },\n \"description\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"model_id": "<string>",
"parameterized_model_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Save To Project
Create a Parameterized Model from ECM fit results.
Uses the system ECM model and stores the fitted interpolant parameters.
Save To Project
curl --request POST \
--url https://api.ionworks.com/ecm/save-to-project \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"cell_spec_id": "<string>",
"num_rcs": 2,
"fit_results": {
"soc": [
123
],
"ocv": [
123
],
"r0": [
123
],
"rc_pairs": [
{
"r": [
123
],
"c": [
123
],
"tau": [
123
]
}
],
"capacity_Ah": [
123
]
},
"description": ""
}
'import requests
url = "https://api.ionworks.com/ecm/save-to-project"
payload = {
"name": "<string>",
"cell_spec_id": "<string>",
"num_rcs": 2,
"fit_results": {
"soc": [123],
"ocv": [123],
"r0": [123],
"rc_pairs": [
{
"r": [123],
"c": [123],
"tau": [123]
}
],
"capacity_Ah": [123]
},
"description": ""
}
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({
name: '<string>',
cell_spec_id: '<string>',
num_rcs: 2,
fit_results: {
soc: [123],
ocv: [123],
r0: [123],
rc_pairs: [{r: [123], c: [123], tau: [123]}],
capacity_Ah: [123]
},
description: ''
})
};
fetch('https://api.ionworks.com/ecm/save-to-project', 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/ecm/save-to-project",
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>',
'cell_spec_id' => '<string>',
'num_rcs' => 2,
'fit_results' => [
'soc' => [
123
],
'ocv' => [
123
],
'r0' => [
123
],
'rc_pairs' => [
[
'r' => [
123
],
'c' => [
123
],
'tau' => [
123
]
]
],
'capacity_Ah' => [
123
]
],
'description' => ''
]),
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/ecm/save-to-project"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"cell_spec_id\": \"<string>\",\n \"num_rcs\": 2,\n \"fit_results\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ],\n \"r0\": [\n 123\n ],\n \"rc_pairs\": [\n {\n \"r\": [\n 123\n ],\n \"c\": [\n 123\n ],\n \"tau\": [\n 123\n ]\n }\n ],\n \"capacity_Ah\": [\n 123\n ]\n },\n \"description\": \"\"\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/ecm/save-to-project")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"cell_spec_id\": \"<string>\",\n \"num_rcs\": 2,\n \"fit_results\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ],\n \"r0\": [\n 123\n ],\n \"rc_pairs\": [\n {\n \"r\": [\n 123\n ],\n \"c\": [\n 123\n ],\n \"tau\": [\n 123\n ]\n }\n ],\n \"capacity_Ah\": [\n 123\n ]\n },\n \"description\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/ecm/save-to-project")
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 \"name\": \"<string>\",\n \"cell_spec_id\": \"<string>\",\n \"num_rcs\": 2,\n \"fit_results\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ],\n \"r0\": [\n 123\n ],\n \"rc_pairs\": [\n {\n \"r\": [\n 123\n ],\n \"c\": [\n 123\n ],\n \"tau\": [\n 123\n ]\n }\n ],\n \"capacity_Ah\": [\n 123\n ]\n },\n \"description\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"model_id": "<string>",
"parameterized_model_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Request body for saving ECM fit results as a Parameterized Model.
Name for the model.
Minimum string length:
1Cell specification ID.
Number of RC pairs.
Required range:
0 <= x <= 5Fit results needed for saving (and re-simulating for validation).
Show child attributes
Show child attributes
Optional description.
Was this page helpful?
⌘I