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:
objectClient 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.
- 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:
- update(project_id: str, data: dict[str, Any] | None = None) Project[source]¶
Update an existing 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:
- 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().
- 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:
- Returns:
The user’s id, and whether an invitation email was sent.
- Return type:
Examples
>>> client.project.invite_member(project_id, "new.user@example.com")