Organization-wide actions can be performed by Organization Admins and Service Accounts with Admin access, allowing them to list and modify all Datasets, Ontologies, and Projects within an Organization.

A common use case is creating a Service Account with managerial privileges, enabling it to perform key administrative tasks on behalf of the Organization 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 Organization 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 (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 Organization 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 (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 Organization 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 (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 Organization 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 (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 Organization.

List Files

The following script can be used by users and Service Accounts to find all files belonging to your Organization.

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 (find_storage_items(include_org_access=True))