Once data is uploaded, you can read it back using theDocumentation Index
Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
Use this file to discover all available pages before exploring further.
ionworks-api Python
client. This page covers listing and filtering resources, retrieving full
measurement detail, local caching, in-Python plotting, and error handling.
For installation and authentication, see the
Python API client page. For uploading, see
uploading data.
Listing resources
Filtering and ordering
Alllist() methods accept keyword-only filter parameters so you can narrow
results server-side instead of fetching everything and filtering in Python.
Filter parameters
| Parameter | Type | Description | Available on |
|---|---|---|---|
name | str | Case-insensitive substring match on name. | All |
name_exact | str | Exact match on name. Takes precedence over name. | All |
form_factor | str | Exact match on form factor. | cell_spec only |
measurement_type | str | Filter by measurement type ("time_series", "properties", "file"). | cell_measurement only |
created_by_email | str | Case-insensitive substring match on creator email. | All |
created_after | str | ISO datetime; records created after this time. | All |
created_before | str | ISO datetime; records created before this time. | All |
updated_after | str | ISO datetime; records updated after this time. | All |
updated_before | str | ISO datetime; records updated before this time. | All |
started_after | str | ISO datetime; measurements started after this time. | cell_measurement only |
started_before | str | ISO datetime; measurements started before this time. | cell_measurement only |
order_by | str | Column to sort by ("name", "created_at", "updated_at", or "start_time" for measurements). | All |
order | str | Sort direction: "asc" or "desc". | All |
Filter parameters can be combined freely with each other and with the
limit/offset pagination parameters. The .total property on the
returned PaginatedList reflects the total count after filters are
applied.Pagination
Alllist() calls return a PaginatedList. The limit and offset
parameters control which page is fetched.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | int | Server default (1000) | Maximum number of items to return (1 to 1000). |
offset | int | 0 | Number of items to skip before returning results. |
PaginatedList behaves like a regular Python list (iterate,
index, check length) and also exposes:
| Property | Description |
|---|---|
.items | The list of results for the current page. |
.total | Total number of matching records across all pages. |
.count | Number of items in the current page. |
Measurement detail
client.cell_measurement.detail() retrieves the full measurement and adapts
its response based on the measurement type.
- Time series
- Properties
- File
Returns time series data, step statistics, and cycle metrics:
| Field | Description |
|---|---|
measurement | Measurement metadata (name, protocol, test setup, notes) |
time_series | Full time series data as a DataFrame (polars by default) |
steps | Step-level statistics as a DataFrame |
cycles | Cycle-level metrics (capacity, efficiency, etc.) as a DataFrame |
specification_id | ID of the parent cell specification (use client.cell_spec.get(id) to fetch) |
instance_id | ID of the parent cell instance (use client.cell_instance.get(spec_id, id) to fetch) |
Local caching
Theionworks-api client automatically caches measurement data to disk so
repeated reads are fast and avoid unnecessary API calls. Caching is enabled
by default and applies to the steps, cycles, steps_and_cycles, and
time_series methods on cell_measurement.
When you call a method like client.cell_measurement.steps(measurement_id),
the client checks a local cache directory before making an API request. If a
cached copy exists and hasn’t expired, it’s returned directly. Otherwise, the
client fetches from the API, caches the result, and returns it.
Cached data is stored as Parquet files in ~/.ionworksdata_cache by default
and expires after one hour.
Skipping the cache
Every data-fetching method accepts ause_cache parameter. Set it to False
to force a fresh API call without reading from or writing to the local cache:
Configuring the cache
| Function | Description |
|---|---|
set_cache_enabled(bool) | Enable or disable caching globally. |
get_cache_enabled() | Return whether caching is currently enabled. |
set_cache_directory(path) | Set the directory for cache files. Default: ~/.ionworksdata_cache. |
set_cache_ttl(seconds) | Set the TTL in seconds. Pass None to disable expiration. Default: 3600. |
get_cache_directory() | Return the current cache directory path. |
get_cache_ttl() | Return the current TTL value. |
clear_cache() | Delete all cached files and return the number deleted. |
Cache configuration is global. Changes affect all subsequent API calls in
the same Python process.
Plotting from Python
DataLoader includes a plot_data() method for quick matplotlib-based
visualization of measurement data. The plot displays voltage and current
over time, with an additional temperature subplot when temperature data is
available.
(Figure, Axes) tuple so you can customize
the plot further. Pass show=True to display the plot immediately:
plot_data() automatically loads time series data from the server if it
hasn’t been fetched yet.Inline time series size limit
When you pass a pandas or polars DataFrame directly in an API call (for example, as part of a pipeline configuration), the client enforces a maximum of 1,000 rows for inline time series data. Larger datasets should be uploaded as measurements first, then referenced by ID.Exporting DataLoader configurations
If you have aDataLoader that references a database measurement and you
want to export a self-contained configuration (for example, to share with a
colleague), use to_local() to embed the data inline:
to_local() fetches all time series and step data from the server
immediately. For very large measurements, this may take a moment.Error handling
The client raises exceptions for common error cases:- Missing or invalid API credentials
- API request errors (raises
IonworksErrorwith details) - Inline time series exceeding 1,000 rows (raises
MeasurementValidationError, a subclass ofIonworksError)
MeasurementValidationError handling pattern.
API error format
All API errors return a consistent JSON structure:| Field | Type | Description |
|---|---|---|
error_code | string | Machine-readable error code (e.g. NOT_FOUND, CONFLICT, BAD_REQUEST). |
message | string | Human-readable description of what went wrong. |
detail | object | null | Optional additional context about the error. Contents vary by error type; may be absent for some errors. |
| Status | Error code | Description |
|---|---|---|
400 | BAD_REQUEST | The request is invalid or missing required fields. |
403 | FORBIDDEN | You don’t have permission to access this resource. Also returned for missing or invalid API credentials (the API does not use 401). |
404 | NOT_FOUND | The requested resource does not exist. |
409 | CONFLICT | A resource with the same name or identifier already exists. The detail field includes the existing_id when available. |
429 | USAGE_LIMIT_REACHED | Your organization has exceeded its usage quota for this billing cycle. |
Full API reference
For the complete Python API reference, see the ionworks-api documentation.Next steps
Visualize data
Explore uploaded data with the interactive in-browser viewer.
Uploading data
End-to-end upload workflow for specs, instances, and measurements.
Measurements
The three measurement types in detail.
Simulation API
Run simulations and pipelines via the Python API.