Update a model within an organization

Changed on

Update a model, validating it belongs to the organization.

patch/models/{model_id}

Request

  • Base URL
    https://api.ionworks.com
  • URL
    https://api.ionworks.com/models/{model_id}
  • Auth
    none declared

Path parameters

model_idstring uuid required

Request body

namestring nullable

The new name of the model.

descriptionstring nullable

The new optional description for the model.

pybamm_versionstring nullable

Updated PyBaMM version used for this model.

chemistry'lithium_ion' | 'lithium_sulfur' | 'ecm' | 'generic' nullable

Updated model chemistry kind.

simulation_settingsobject nullable

Updated persistent simulation kwargs (mesh + solver).

Response

Successful Response

namestring required

The name of the model.

descriptionstring nullable

An optional description for the model.

pybamm_versionstring nullable

PyBaMM version used for this model. If not provided, will be read from pybamm.version.

chemistry'lithium_ion' | 'lithium_sulfur' | 'ecm' | 'generic'

Model chemistry kind: 'lithium_ion' (default — assumes pybamm lithium-ion conventions), 'lithium_sulfur', 'ecm', or 'generic' (no chemistry-specific enrichment).

simulation_settingsobject nullable

Optional persistent simulation kwargs (var_pts / submesh_types / spatial_methods / geometry / solver) in the flat canonical form, re-applied at simulation time. None uses the model defaults.

project_idstring nullable

Project this model belongs to. None only for the shared system catalog.

idstring required

The unique identifier for the model.

user_idstring nullable

The ID of the user who created the model. None once that account is deleted.

organization_idstring required

The ID of the organization this model belongs to.

source_model_idstring nullable

For a project's copy of a system model, the system model it was copied from. None for a model the project made itself.

created_by_emailstring nullable

Email of the user who created the model.

created_atstring date-time required

Timestamp of when the model was created.

updated_atstring date-time required

Timestamp of when the model was last updated.

is_custom_modelboolean required

Check if this is a custom model (has compressed model data).

Changes

    • breaking

      the response property became optional for the status

    • breaking

      response property user_id list-of-types was widened by adding types null to media type application/json of response 200

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • breaking

      for the path request parameter model_id, the format changed from no format to uuid