Skip to main content
Update a cell measurement by id
curl --request PATCH \
  --url https://api.ionworks.com/cell_measurements/{measurement_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "protocol": {},
  "test_setup": {},
  "notes": "<string>",
  "properties": {}
}
'
import requests

url = "https://api.ionworks.com/cell_measurements/{measurement_id}"

payload = {
"name": "<string>",
"protocol": {},
"test_setup": {},
"notes": "<string>",
"properties": {}
}
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>',
protocol: {},
test_setup: {},
notes: '<string>',
properties: {}
})
};

fetch('https://api.ionworks.com/cell_measurements/{measurement_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/cell_measurements/{measurement_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>',
'protocol' => [

],
'test_setup' => [

],
'notes' => '<string>',
'properties' => [

]
]),
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/cell_measurements/{measurement_id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"protocol\": {},\n \"test_setup\": {},\n \"notes\": \"<string>\",\n \"properties\": {}\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/cell_measurements/{measurement_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"protocol\": {},\n \"test_setup\": {},\n \"notes\": \"<string>\",\n \"properties\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.ionworks.com/cell_measurements/{measurement_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 \"protocol\": {},\n \"test_setup\": {},\n \"notes\": \"<string>\",\n \"properties\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "id": "<string>",
  "cell_instance_id": "<string>",
  "organization_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "protocol": {},
  "start_time": "2023-11-07T05:31:56Z",
  "test_setup": {},
  "step_labels_validated": false,
  "notes": "<string>",
  "measurement_type": "time_series",
  "properties": {},
  "file_metadata": {},
  "created_by": "<string>",
  "created_by_email": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Path Parameters

measurement_id
string
required

Body

application/json

Model for updating an existing cell measurement. All fields optional.

name
string | null
Required string length: 1 - 255
protocol
Protocol · object | null

Protocol information as a dict with: name (str), ambient_temperature_degc (float), definition (dict | str - UCP or other protocol format)

test_setup
Test Setup · object | null

Test setup: cycler, operator, lab, etc.

notes
string | null
properties
Properties · object | null

Key-value measurements using Quantity format for numerics. Only for measurement_type='properties'. Example: {'thickness': {'value': 0.52, 'unit': 'mm'}}

Response

Successful Response

name
string
required
Required string length: 1 - 255
id
string
required
cell_instance_id
string
required
organization_id
string
required

Organization this measurement belongs to.

created_at
string<date-time>
required
updated_at
string<date-time>
required
protocol
Protocol · object | null

Protocol information. Typical keys: 'name' (str), 'ambient_temperature_degc' (float), 'definition' (dict | str — a UCP protocol definition or another protocol format).

start_time
string<date-time> | null

ISO 8601 datetime with timezone (UTC preferred) marking when the test started.

test_setup
Test Setup · object | null

Physical test setup. Typical keys: 'cycler' (model), 'operator', 'lab', 'channel_number' (int).

step_labels_validated
boolean
default:false

Set to true only once step-type labels (Rest, CC charge, CV, discharge, etc.) have been manually reviewed. Server-inferred labels should leave this false.

notes
string | null

Free-text notes about the cell measurement

measurement_type
enum<string>
default:time_series

What shape of data this measurement holds. Determines which fields are populated and which upload flow applies. See the class docstring.

Available options:
time_series,
file,
properties
properties
Properties · object | null

Flat key/value measurements, populated only when measurement_type is 'properties'. Numeric values use the Quantity format. Example: {'thickness': {'value': 0.52, 'unit': 'mm'}, 'DCIR': {'value': 12, 'unit': 'mohm'}}.

file_metadata
File Metadata · object | null

Metadata about uploaded files (MIME types, dimensions, etc.)

created_by
string | null

User ID of the user who created this measurement

created_by_email
string | null

Email of the user who created this measurement