Studies#
Manage studies within projects in Ionworks Studio.
For usage examples and guides, see Managing studies on docs.ionworks.com.
Study client for managing studies and their resource assignments.
This module provides the StudyClient for creating, reading,
updating, and deleting studies, as well as assigning and removing
simulations and measurements from studies.
- class ionworks.study.StudyClient(client)[source]#
Bases:
objectClient for managing studies within projects.
Studies group related simulations and measurements for comparison and analysis. They belong to a project within an organization.
All methods accept
project_idas an optional argument. When omitted, the value falls back to theproject_idconfigured on the parentIonworksclient (resolved from theIONWORKS_PROJECT_IDenv var if not passed explicitly). Methods raiseValueErrorif no project_id is available from any source.- Parameters:
client (Any)
- __init__(client)[source]#
Initialize the StudyClient.
- Parameters:
client (Any) – The HTTP client instance for making API requests.
- Return type:
None
- list(project_id=None, limit=None, offset=None, *, name=None, name_exact=None, order_by=None, order=None)[source]#
List studies within a project.
- Parameters:
project_id (str | None, optional) – The ID of the project to list studies for. Defaults to the project_id set on the Ionworks client.
limit (int | None, optional) – Maximum number of studies to return per page.
offset (int | None, optional) – Number of studies to skip for pagination.
name (str | None, optional) – Case-insensitive substring match on study name.
name_exact (str | None, optional) – Exact match on study name.
order_by (str | None, optional) – Column to sort by.
order (str | None, optional) – Sort direction:
"asc"or"desc".
- Returns:
A list of study objects (includes
simulation_countandvalidation_countvia extra fields).- Return type:
- create(data=None, project_id=None)[source]#
Create a new study.
- Parameters:
- Returns:
The newly created study object.
- Return type:
- update(study_id, data=None, project_id=None)[source]#
Update an existing study.
- Parameters:
- Returns:
The updated study object.
- Return type:
- assign_simulation(study_id, simulation_id, project_id=None)[source]#
Assign a simulation to a study.
This operation is idempotent – assigning an already-assigned simulation returns the existing mapping.
- remove_simulation(study_id, simulation_id, project_id=None)[source]#
Remove a simulation from a study.
- assign_measurement(study_id, measurement_id, project_id=None)[source]#
Assign a measurement to a study.
- list_measurements(study_id, project_id=None, limit=None, offset=None)[source]#
List measurements assigned to a study with pagination.
- Parameters:
study_id (str) – The ID of the study.
project_id (str | None, optional) – The ID of the project. Defaults to the project_id set on the Ionworks client.
limit (int | None, optional) – Maximum number of measurements to return per page.
offset (int | None, optional) – Number of measurements to skip for pagination.
- Returns:
Paginated response with
items,count, andtotalkeys.- Return type: