Create user groups using the Encord platform.
List user groups
Listing user groups returns a list of all user group names.List all user groups in your Workspace
You can list all users groups that currently exist within your Workspace. In the following script, ensure that you replace <private_key_path> with the path to your private key.List user groups for Projects / Datasets / Ontologies
You can list all existing user groups for a specific Project. In the following script, ensure that you:- Replace <private_key_path> with the path to your private key.
- If you are using the Project script, replace <project_hash> with the hash of the Project you want to list user groups for.
- If you are using the Dataset script, replace <dataset_hash> with the hash of the Dataset you want to list user groups for.
- If you are using the Ontology script, replace <ontology_hash> with the hash of the Ontology you want to list user groups for.
Add user groups
User groups can be added to Projects, Datasets, and Ontologies.Add user group to Projects
Use the following scripts to add user groups to a Project.Only group members are added, not group managers.
- Replace <private_key_path> with the path to your private key.
- Replace <project_hash> with the hash of the Project you want to add a user group to.
- Replace <group_name1> and <group_name2> with the name of the user group(s) you want to add to the Project. You can add one or multiple groups to a Project at once.
Add user group to Datasets
User groups can be added to Datasets. In the following scripts, ensure that you:- Replace <private_key_path> with the path to your private key.
- Replace <dataset_hash> with the hash of the Dataset you want to add a user group to.
- Replace <group_name1> and <group_name2> with the name of the user group(s) you want to add to the Dataset. You can add one or multiple groups to a Dataset at once.
Add user group to Ontologies
Use the following scripts to add user groups to Ontologies. In the following scripts, ensure that you:- Replace <private_key_path> with the path to your private key.
- Replace <ontology_hash> with the hash of the Ontology you want to add a user group to.
- Replace <group_name1> and <group_name2> with the name of the user group(s) you want to add to the Ontology. You can add one, or multiple groups to an Ontology at once.
Remove user groups from Projects / Datasets / Ontologies
User groups can be removed from Projects, Datasets, and Ontologies individually, or in bulk.Admins can only be removed from Projects, Datasets, or Ontologies by Workspace admins.
- Replace
<private_key_path>with the path to your private key. - If using the Project script, replace
<project_hash>with the hash of the Project you want to remove user groups from. - If using the Dataset script, replace
<dataset_hash>with the hash of the Dataset you want to remove user groups from. - If using the Ontology script, replace
<ontology_hash>with the hash of the Ontology you want to remove user groups from. - Replace
<group_name1>and<group_name2>with the name of the user group(s) you want to remove from the Project. You can remove one, or multiple groups from a Project at once.

