Skip to main content
Create a new model within an organization
curl --request POST \
  --url https://api.ionworks.com/models \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "config": {},
  "description": "<string>",
  "pybamm_version": "<string>"
}
'
{
  "name": "<string>",
  "id": "<string>",
  "user_id": "<string>",
  "organization_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "is_custom_model": true,
  "description": "<string>",
  "pybamm_version": "<string>",
  "created_by_email": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

Model for creating a new model.

name
string
required

The name of the model.

config
Config · object
required

Model configuration stored as JSON.

description
string | null

An optional description for the model.

pybamm_version
string | null

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

Response

Successful Response

Model representing a model as returned by the API (without config).

name
string
required

The name of the model.

id
string
required

The unique identifier for the model.

user_id
string
required

The ID of the user who created the model.

organization_id
string
required

The ID of the organization this model belongs to.

created_at
string<date-time>
required

Timestamp of when the model was created.

updated_at
string<date-time>
required

Timestamp of when the model was last updated.

is_custom_model
boolean
required
read-only

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

description
string | null

An optional description for the model.

pybamm_version
string | null

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

created_by_email
string | null

Email of the user who created the model.