Fit From Measurements
curl --request POST \
--url https://api.ionworks.com/ecm/fit-from-measurements \
--header 'Content-Type: application/json' \
--data '
{
"measurements": [
{
"id": "<string>",
"start_step": 123,
"end_step": 123,
"initial_soc": 0.5,
"capacity": 1
}
],
"ecm_options": {
"num_rcs": 2,
"fit_ocv": true,
"capacity": 1,
"regularization": 0,
"ocv_soc_curve": {
"soc": [
123
],
"ocv": [
123
]
},
"bounds_capacity": {
"lo": 123,
"hi": 123
},
"num_knots": 32,
"num_knots_r0": 32,
"knot_schedule": [
123
],
"clamp_boundary_knots": true,
"clamp_max_ratio": 10
}
}
'import requests
url = "https://api.ionworks.com/ecm/fit-from-measurements"
payload = {
"measurements": [
{
"id": "<string>",
"start_step": 123,
"end_step": 123,
"initial_soc": 0.5,
"capacity": 1
}
],
"ecm_options": {
"num_rcs": 2,
"fit_ocv": True,
"capacity": 1,
"regularization": 0,
"ocv_soc_curve": {
"soc": [123],
"ocv": [123]
},
"bounds_capacity": {
"lo": 123,
"hi": 123
},
"num_knots": 32,
"num_knots_r0": 32,
"knot_schedule": [123],
"clamp_boundary_knots": True,
"clamp_max_ratio": 10
}
}
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({
measurements: [
{id: '<string>', start_step: 123, end_step: 123, initial_soc: 0.5, capacity: 1}
],
ecm_options: {
num_rcs: 2,
fit_ocv: true,
capacity: 1,
regularization: 0,
ocv_soc_curve: {soc: [123], ocv: [123]},
bounds_capacity: {lo: 123, hi: 123},
num_knots: 32,
num_knots_r0: 32,
knot_schedule: [123],
clamp_boundary_knots: true,
clamp_max_ratio: 10
}
})
};
fetch('https://api.ionworks.com/ecm/fit-from-measurements', 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/fit-from-measurements",
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([
'measurements' => [
[
'id' => '<string>',
'start_step' => 123,
'end_step' => 123,
'initial_soc' => 0.5,
'capacity' => 1
]
],
'ecm_options' => [
'num_rcs' => 2,
'fit_ocv' => true,
'capacity' => 1,
'regularization' => 0,
'ocv_soc_curve' => [
'soc' => [
123
],
'ocv' => [
123
]
],
'bounds_capacity' => [
'lo' => 123,
'hi' => 123
],
'num_knots' => 32,
'num_knots_r0' => 32,
'knot_schedule' => [
123
],
'clamp_boundary_knots' => true,
'clamp_max_ratio' => 10
]
]),
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/fit-from-measurements"
payload := strings.NewReader("{\n \"measurements\": [\n {\n \"id\": \"<string>\",\n \"start_step\": 123,\n \"end_step\": 123,\n \"initial_soc\": 0.5,\n \"capacity\": 1\n }\n ],\n \"ecm_options\": {\n \"num_rcs\": 2,\n \"fit_ocv\": true,\n \"capacity\": 1,\n \"regularization\": 0,\n \"ocv_soc_curve\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ]\n },\n \"bounds_capacity\": {\n \"lo\": 123,\n \"hi\": 123\n },\n \"num_knots\": 32,\n \"num_knots_r0\": 32,\n \"knot_schedule\": [\n 123\n ],\n \"clamp_boundary_knots\": true,\n \"clamp_max_ratio\": 10\n }\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/fit-from-measurements")
.header("Content-Type", "application/json")
.body("{\n \"measurements\": [\n {\n \"id\": \"<string>\",\n \"start_step\": 123,\n \"end_step\": 123,\n \"initial_soc\": 0.5,\n \"capacity\": 1\n }\n ],\n \"ecm_options\": {\n \"num_rcs\": 2,\n \"fit_ocv\": true,\n \"capacity\": 1,\n \"regularization\": 0,\n \"ocv_soc_curve\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ]\n },\n \"bounds_capacity\": {\n \"lo\": 123,\n \"hi\": 123\n },\n \"num_knots\": 32,\n \"num_knots_r0\": 32,\n \"knot_schedule\": [\n 123\n ],\n \"clamp_boundary_knots\": true,\n \"clamp_max_ratio\": 10\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/ecm/fit-from-measurements")
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 \"measurements\": [\n {\n \"id\": \"<string>\",\n \"start_step\": 123,\n \"end_step\": 123,\n \"initial_soc\": 0.5,\n \"capacity\": 1\n }\n ],\n \"ecm_options\": {\n \"num_rcs\": 2,\n \"fit_ocv\": true,\n \"capacity\": 1,\n \"regularization\": 0,\n \"ocv_soc_curve\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ]\n },\n \"bounds_capacity\": {\n \"lo\": 123,\n \"hi\": 123\n },\n \"num_knots\": 32,\n \"num_knots_r0\": 32,\n \"knot_schedule\": [\n 123\n ],\n \"clamp_boundary_knots\": true,\n \"clamp_max_ratio\": 10\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Fit From Measurements
Submit an ECM fit using measurements stored in the platform.
Returns 202 Accepted with {"job_id": ..., "status": ...}. Poll
GET /jobs/{job_id} for the result. Always includes RC-pair
parameters in the result (authenticated endpoint).
Fit From Measurements
curl --request POST \
--url https://api.ionworks.com/ecm/fit-from-measurements \
--header 'Content-Type: application/json' \
--data '
{
"measurements": [
{
"id": "<string>",
"start_step": 123,
"end_step": 123,
"initial_soc": 0.5,
"capacity": 1
}
],
"ecm_options": {
"num_rcs": 2,
"fit_ocv": true,
"capacity": 1,
"regularization": 0,
"ocv_soc_curve": {
"soc": [
123
],
"ocv": [
123
]
},
"bounds_capacity": {
"lo": 123,
"hi": 123
},
"num_knots": 32,
"num_knots_r0": 32,
"knot_schedule": [
123
],
"clamp_boundary_knots": true,
"clamp_max_ratio": 10
}
}
'import requests
url = "https://api.ionworks.com/ecm/fit-from-measurements"
payload = {
"measurements": [
{
"id": "<string>",
"start_step": 123,
"end_step": 123,
"initial_soc": 0.5,
"capacity": 1
}
],
"ecm_options": {
"num_rcs": 2,
"fit_ocv": True,
"capacity": 1,
"regularization": 0,
"ocv_soc_curve": {
"soc": [123],
"ocv": [123]
},
"bounds_capacity": {
"lo": 123,
"hi": 123
},
"num_knots": 32,
"num_knots_r0": 32,
"knot_schedule": [123],
"clamp_boundary_knots": True,
"clamp_max_ratio": 10
}
}
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({
measurements: [
{id: '<string>', start_step: 123, end_step: 123, initial_soc: 0.5, capacity: 1}
],
ecm_options: {
num_rcs: 2,
fit_ocv: true,
capacity: 1,
regularization: 0,
ocv_soc_curve: {soc: [123], ocv: [123]},
bounds_capacity: {lo: 123, hi: 123},
num_knots: 32,
num_knots_r0: 32,
knot_schedule: [123],
clamp_boundary_knots: true,
clamp_max_ratio: 10
}
})
};
fetch('https://api.ionworks.com/ecm/fit-from-measurements', 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/fit-from-measurements",
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([
'measurements' => [
[
'id' => '<string>',
'start_step' => 123,
'end_step' => 123,
'initial_soc' => 0.5,
'capacity' => 1
]
],
'ecm_options' => [
'num_rcs' => 2,
'fit_ocv' => true,
'capacity' => 1,
'regularization' => 0,
'ocv_soc_curve' => [
'soc' => [
123
],
'ocv' => [
123
]
],
'bounds_capacity' => [
'lo' => 123,
'hi' => 123
],
'num_knots' => 32,
'num_knots_r0' => 32,
'knot_schedule' => [
123
],
'clamp_boundary_knots' => true,
'clamp_max_ratio' => 10
]
]),
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/fit-from-measurements"
payload := strings.NewReader("{\n \"measurements\": [\n {\n \"id\": \"<string>\",\n \"start_step\": 123,\n \"end_step\": 123,\n \"initial_soc\": 0.5,\n \"capacity\": 1\n }\n ],\n \"ecm_options\": {\n \"num_rcs\": 2,\n \"fit_ocv\": true,\n \"capacity\": 1,\n \"regularization\": 0,\n \"ocv_soc_curve\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ]\n },\n \"bounds_capacity\": {\n \"lo\": 123,\n \"hi\": 123\n },\n \"num_knots\": 32,\n \"num_knots_r0\": 32,\n \"knot_schedule\": [\n 123\n ],\n \"clamp_boundary_knots\": true,\n \"clamp_max_ratio\": 10\n }\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/fit-from-measurements")
.header("Content-Type", "application/json")
.body("{\n \"measurements\": [\n {\n \"id\": \"<string>\",\n \"start_step\": 123,\n \"end_step\": 123,\n \"initial_soc\": 0.5,\n \"capacity\": 1\n }\n ],\n \"ecm_options\": {\n \"num_rcs\": 2,\n \"fit_ocv\": true,\n \"capacity\": 1,\n \"regularization\": 0,\n \"ocv_soc_curve\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ]\n },\n \"bounds_capacity\": {\n \"lo\": 123,\n \"hi\": 123\n },\n \"num_knots\": 32,\n \"num_knots_r0\": 32,\n \"knot_schedule\": [\n 123\n ],\n \"clamp_boundary_knots\": true,\n \"clamp_max_ratio\": 10\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/ecm/fit-from-measurements")
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 \"measurements\": [\n {\n \"id\": \"<string>\",\n \"start_step\": 123,\n \"end_step\": 123,\n \"initial_soc\": 0.5,\n \"capacity\": 1\n }\n ],\n \"ecm_options\": {\n \"num_rcs\": 2,\n \"fit_ocv\": true,\n \"capacity\": 1,\n \"regularization\": 0,\n \"ocv_soc_curve\": {\n \"soc\": [\n 123\n ],\n \"ocv\": [\n 123\n ]\n },\n \"bounds_capacity\": {\n \"lo\": 123,\n \"hi\": 123\n },\n \"num_knots\": 32,\n \"num_knots_r0\": 32,\n \"knot_schedule\": [\n 123\n ],\n \"clamp_boundary_knots\": true,\n \"clamp_max_ratio\": 10\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Request body for fitting ECM from database measurements.
Response
Successful Response
Was this page helpful?
⌘I