Projects

Manage projects in Ionworks Studio.

For usage examples and guides, see Managing projects on docs.ionworks.com.

Project client for managing projects within organizations.

This module provides the ProjectClient for creating, reading, updating, and deleting projects, which organize resources (studies, simulations, pipelines, etc.) within an organization.

class ionworks.api.project.ProjectClient(client: Any)[source]

Bases: object

Client for managing projects within organizations.

Projects group resources like studies, simulations, pipelines, and optimizations within an organization.

__init__(client: Any) → None[source]

Initialize the ProjectClient.

Parameters:

client (Any) – The HTTP client instance for making API requests.

get(project_id: str) → Project[source]

Get a specific project by ID.

Parameters:

project_id (str) – The ID of the project to retrieve.

Returns:

The requested project object.

Return type:

Project

list(limit: int | None = None, offset: int | None = None, *, name: str | None = None, name_exact: str | None = None, created_after: str | None = None, created_before: str | None = None, updated_after: str | None = None, updated_before: str | None = None, order_by: str | None = None, order: str | None = None) → PaginatedList[Project][source]

List projects with optional filtering.

Parameters:
  • limit (int | None, optional) – Maximum number of projects to return per page.

  • offset (int | None, optional) – Number of projects to skip for pagination.

  • name (str | None, optional) – Case-insensitive substring match on project name.

  • name_exact (str | None, optional) – Exact match on project name.

  • created_after (str | None, optional) – ISO datetime; return projects created after this time.

  • created_before (str | None, optional) – ISO datetime; return projects created before this time.

  • updated_after (str | None, optional) – ISO datetime; return projects updated after this time.

  • updated_before (str | None, optional) – ISO datetime; return projects updated before this time.

  • order_by (str | None, optional) – Column to sort by.

  • order (str | None, optional) – Sort direction: "asc" or "desc".

Returns:

A list of project objects.

Return type:

PaginatedList[Project]

create(data: dict[str, Any] | None = None) → Project[source]

Create a new project.

Parameters:

data (dict[str, Any]) – Dictionary containing the project data. Required fields: name. Optional fields: description.

Returns:

The newly created project object.

Return type:

Project

update(project_id: str, data: dict[str, Any] | None = None) → Project[source]

Update an existing project.

Parameters:
  • project_id (str) – The ID of the project to update.

  • data (dict[str, Any]) – Dictionary containing the fields to update. Supports name and description.

Returns:

The updated project object.

Return type:

Project

delete(project_id: str) → None[source]

Delete a project by ID.

Parameters:

project_id (str) – The ID of the project to delete.

roles() → list[ProjectRoleInfo][source]

List the project roles that can be granted.

Returns:

Each role’s id, name ("Project Admin", "Project Contributor", "Project Viewer") and description.

Return type:

list[ProjectRoleInfo]

add_member(project_id: str, user_id: str, role: str = 'Project Contributor') → None[source]

Grant an organization member a role in a project.

Also changes the role of someone who is already a project member. The user must already belong to the organization; to invite someone new, use invite_member().

Parameters:
  • project_id (str) – The project to grant access to.

  • user_id (str) – The organization member’s user id.

  • role (str, optional) – Project role name or id. Defaults to "Project Contributor".

invite_member(project_id: str, email: str, role: str = 'Project Contributor') → InviteResult[source]

Invite someone to a project by email, adding them to the org if needed.

A person outside the organization joins it as a Member; an existing member keeps their organization role. Unregistered emails are sent a sign-up invitation.

Parameters:
  • project_id (str) – The project to grant access to.

  • email (str) – Email address of the person to invite.

  • role (str, optional) – Project role name or id. Defaults to "Project Contributor".

Returns:

The user’s id, and whether an invitation email was sent.

Return type:

InviteResult

Examples

>>> client.project.invite_member(project_id, "new.user@example.com")
update_member(project_id: str, user_id: str, role: str) → None[source]

Change a project member’s role.

Parameters:
  • project_id (str) – The project.

  • user_id (str) – The member’s user id.

  • role (str) – New project role name or id.

remove_member(project_id: str, user_id: str) → None[source]

Remove a user from a project (their organization membership is kept).

Parameters:
  • project_id (str) – The project.

  • user_id (str) – The member’s user id.