add_members_to_project
imerit_ango.sdk.SDK.
add_members_to_project(project_id, members, role)
Assign one or more existing organization members to a specified project with a defined project role.
Parameters
project_id: string
The unique identifier for the project. You can find the project ID in the user interface or retrieve it using the
list_projects
function.
members: List[str]
A list of emails of the user(s) you wish to add to the project.
Example:
["[email protected]", "[email protected]"]
role: imerit_ango.models.enums.ProjectRoles
The role in which you would like to add the user(s) to the project. Possible roles include:
ProjectRoles.Manager
ProjectRoles.Labeler
ProjectRoles.Reviewer
ProjectRoles.Lead
Note: You must import the enum containing the roles using
from imerit_ango.models.enums import ProjectRoles
Returns:
output: dict
A dictionary containing the result of the operation.
All specified users must be existing members of the organization. To invite new users, use the invite_members_to_org function.
Example
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from imerit_ango.models.enums import ProjectRoles
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')
ango_sdk = SDK(api_key)
ango_sdk.add_members_to_project(project_id=project_id,
members=["[email protected]", "[email protected]"],
role=ProjectRoles.Labeler)
Last updated