Skip to main content
Workspace-wide actions can be performed by Workspace Admins and Service Accounts with Admin access, allowing them to list and modify all Datasets, Ontologies, and Projects within a Workspace. A common use case is creating a Service Account with managerial privileges, enabling it to perform key administrative tasks on behalf of the Workspace Admin.
Projects, Datasets, and Ontologies cannot be deleted using the SDK. To remove them, use the Encord platform.

Listing Datasets

The following script can be used by users and Service Accounts with the Admin role in their Workspace to retrieve a list of all Datasets.
# Import dependencies
from encord.user_client import EncordUserClient

# Authenticate using the path to your private key. Replace <private_key_path> with the path to your key
user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path="<private_key_path>"
    )

print (user_client.get_datasets(include_org_access=True))

List Ontologies

The following script can be used by users and Service Accounts with the Admin role in their Workspace to retrieve a list of all Ontologies.
# Import dependencies
from encord.user_client import EncordUserClient

# Authenticate using the path to your private key. Replace <private_key_path> with the path to your key
user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path="<private_key_path>"
    )

print (user_client.get_ontologies(include_org_access=True))

List Projects

The following script can be used by users and Service Accounts with the Admin role in their Workspace to retrieve a list of all Projects.
# Import dependencies
from encord.user_client import EncordUserClient

# Authenticate using the path to your private key. Replace <private_key_path> with the path to your key
user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path="<private_key_path>"
    )

print (user_client.list_projects(include_org_access=True))

List Cloud Integrations

The following script can be used by users and Service Accounts with the Admin role in their Workspace to retrieve a list of all Cloud Integrations.
# Import dependencies
from encord.user_client import EncordUserClient

# Authenticate using the path to your private key. Replace <private_key_path> with the path to your key
user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path="<private_key_path>"
    )

print (user_client.get_cloud_integrations(include_org_access=True))

List Storage Folders

The following scripts can be used by users and Service Accounts to list folders belonging to your Workspace.
# Import dependencies
from encord.user_client import EncordUserClient

# Authenticate using the path to your private key. Replace <private_key_path> with the path to your key
user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path="<private_key_path>"
    )

print (user_client.list_storage_folders(include_org_access=True))

List Files

The following script can be used by users and Service Accounts to find all files belonging to your Workspace.
All Files
# Import dependencies
from encord.user_client import EncordUserClient

# Authenticate using the path to your private key. Replace <private_key_path> with the path to your key
user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path="<private_key_path>"
    )

print (user_client.find_storage_items(include_org_access=True))