Install and authenticate first:
pip install ionworks-api and set IONWORKS_API_KEY. See the Python API client page.- Two ways to scope work to a project: pass the project id explicitly per call (e.g.
client.study.create(project_id, ...)), or setIONWORKS_PROJECT_IDin your environment so it becomes the default for calls whoseproject_idis optional. client.projecthas the full CRUD set:.list(),.get(id),.create(data),.update(id, data),.delete(id).- Projects and studies have no
create_or_get. For re-runnable scripts, catch theCONFLICTerror and readexisting_idfrom its detail to reuse an existing one.
Learn more
- Projects & studies
- Organizations
- Python API client —
project_idargument andIONWORKS_PROJECT_IDprecedence