> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# User client

## EncordUserClient Objects

```python theme={"dark"}
class EncordUserClient()
```

High–level entrypoint to the Encord SDK for an authenticated user.

\`EncordUserClient\`\` is the primary interface for interacting with
Encord resources such as Projects, Datasets, Collections, Workflows, and
Storage Items. It manages authentication, request signing, and low-level
communication on behalf of the user.

Typical usage involves creating a client using constructors
(for example, `EncordUserClient.create_with_ssh_private_key` or
`EncordUserClient.create_with_service_account`), then calling methods:

* Listing or retrieving projects and datasets
* Accessing project configuration, ontology, and workflows
* Managing storage and data units
* Running analytics queries
* Interacting with collections and Index

**Arguments**:

config : UserConfig The user configuration containing authentication credentials
and client options.
querier : Querier Internal HTTP/query executor used to communicate with the Encord API.
Users do not normally construct this directly.

**Notes**

Instances of this class should generally be created using the provided
`create_*` methods rather than by calling the constructor
directly.

#### ml\_models

```python theme={"dark"}
@property
def ml_models() -> MlModelsClient
```

Access Encord ML Models functionality.

**Returns**:

* `MlModelsClient` - Client for interacting with Encord's ML models

#### get\_dataset

```python theme={"dark"}
def get_dataset(
    dataset_hash: Union[str, UUID],
    dataset_access_settings:
    DatasetAccessSettings = DEFAULT_DATASET_ACCESS_SETTINGS
) -> Dataset
```

Get the Dataset class to access dataset fields and manipulate a dataset.

You only have access to this project if you are one of the following

* Dataset admin

* Organization admin of the project

**Arguments**:

* `dataset_hash` - The Dataset ID
* `dataset_access_settings` - Set the dataset\_access\_settings if you would like to change the defaults.

**Returns**:

Returns all Dataset information (title, dataset\_hash, dataset\_type, and more) and all data rows (including all data row information for each data unit).

#### get\_project

```python theme={"dark"}
def get_project(project_hash: Union[str, UUID]) -> Project
```

Get the Project class to access project fields and manipulate a project.

You will only have access to this project if you are one of the following

* Project admin

* Project team manager

* Organization admin of the project

**Arguments**:

* `project_hash` - The Project ID

#### create\_private\_dataset

```python theme={"dark"}
@deprecated("0.1.104", alternative=".create_dataset")
def create_private_dataset(
        dataset_title: str,
        dataset_type: StorageLocation,
        dataset_description: Optional[str] = None) -> CreateDatasetResponse
```

DEPRECATED - please use `create_dataset` instead.

#### create\_dataset

```python theme={"dark"}
def create_dataset(
        dataset_title: str,
        dataset_type: StorageLocation,
        dataset_description: Optional[str] = None,
        create_backing_folder: bool = True) -> CreateDatasetResponse
```

**Arguments**:

* `dataset_title` *str* - Title of the dataset.
* `dataset_type` *StorageLocation* - Type of storage location where the data will be stored.
* `dataset_description` *Optional\[str]* - Optional description of the dataset.
* `create_backing_folder` *bool* - Whether to create a mirrored backing Folder. If True (default),
  the Folder and Dataset are synced. Recommended to set False for complex
  or large-scale projects.

**Returns**:

CreateDatasetResponse:

#### get\_datasets

```python theme={"dark"}
def get_datasets(title_eq: Optional[str] = None,
                 title_like: Optional[str] = None,
                 desc_eq: Optional[str] = None,
                 desc_like: Optional[str] = None,
                 created_before: Optional[Union[str, datetime]] = None,
                 created_after: Optional[Union[str, datetime]] = None,
                 edited_before: Optional[Union[str, datetime]] = None,
                 edited_after: Optional[Union[str, datetime]] = None,
                 include_org_access: bool = False) -> List[Dict[str, Any]]
```

List either all (if called with no arguments) or matching datasets the user has access to.

**Arguments**:

* `title_eq` - optional exact title filter
* `title_like` - optional fuzzy title filter; SQL syntax
* `desc_eq` - optional exact description filter
* `desc_like` - optional fuzzy description filter; SQL syntax
* `created_before` - optional creation date filter, 'less'
* `created_after` - optional creation date filter, 'greater'
* `edited_before` - optional last modification date filter, 'less'
* `edited_after` - optional last modification date filter, 'greater'
* `include_org_access` - if set to true and the calling user is the organization admin, the
  method returns all datasets in the organization.

**Returns**:

list of datasets matching filter conditions, with the roles that the current user has on them. Each item
is a dictionary with `"dataset"` and `"user_role"` keys. If include\_org\_access is set to
True, some of the datasets may have a `None` value for the `"user_role"` key.

#### create\_with\_ssh\_private\_key

```python theme={"dark"}
@staticmethod
def create_with_ssh_private_key(
        ssh_private_key: Optional[str] = None,
        password: Optional[str] = None,
        requests_settings: RequestsSettings = DEFAULT_REQUESTS_SETTINGS,
        ssh_private_key_path: Optional[Union[str, Path]] = None,
        domain: str = ENCORD_DOMAIN,
        **kwargs) -> EncordUserClient
```

Creates an instance of EncordUserClient authenticated with private SSH key.
Accepts the private key content, path to key file, that can be provided as method parameters or as following environment variables:

* **ENCORD\_SSH\_KEY**: environment variable with the private key content
* **ENCORD\_SSH\_KEY\_FILE**: environment variable with the path to the key file

**Arguments**:

* `ssh_private_key` - the private key content
* `password` - private key password
* `requests_settings` - Request settings. Useful default provided
* `ssh_private_key_path` - the path to the private key file
* `domain` - The underlying Encord domain to connect too. Need only be changed for US or Private Clouds

#### get\_projects

```python theme={"dark"}
@deprecated("0.1.181", ".list_projects()")
def get_projects(
        title_eq: Optional[str] = None,
        title_like: Optional[str] = None,
        desc_eq: Optional[str] = None,
        desc_like: Optional[str] = None,
        created_before: Optional[Union[str, datetime]] = None,
        created_after: Optional[Union[str, datetime]] = None,
        edited_before: Optional[Union[str, datetime]] = None,
        edited_after: Optional[Union[str, datetime]] = None) -> List[Dict]
```

List either all (if called with no arguments) or matching projects the user has access to.

**Arguments**:

* `title_eq` - optional exact title filter
* `title_like` - optional fuzzy title filter; SQL syntax
* `desc_eq` - optional exact description filter
* `desc_like` - optional fuzzy description filter; SQL syntax
* `created_before` - optional creation date filter, 'less'
* `created_after` - optional creation date filter, 'greater'
* `edited_before` - optional last modification date filter, 'less'
* `edited_after` - optional last modification date filter, 'greater'

**Returns**:

list of Projects matching filter conditions, with the roles that the current user has on them. Each item
is a dictionary with `"project"` and `"user_role"` keys.

#### list\_projects

```python theme={"dark"}
def list_projects(
    title_eq: Optional[str] = None,
    title_like: Optional[str] = None,
    desc_eq: Optional[str] = None,
    desc_like: Optional[str] = None,
    created_before: Optional[Union[str, datetime]] = None,
    created_after: Optional[Union[str, datetime]] = None,
    edited_before: Optional[Union[str, datetime]] = None,
    edited_after: Optional[Union[str, datetime]] = None,
    include_org_access: bool = False,
    tags_anyof: Optional[Union[List[str], List[ProjectTag]]] = None
) -> Iterable[Project]
```

List either all (if called with no arguments) or matching projects the user has access to.

**Arguments**:

* `title_eq` - optional exact title filter
* `title_like` - optional fuzzy title filter; SQL syntax
* `desc_eq` - optional exact description filter
* `desc_like` - optional fuzzy description filter; SQL syntax
* `created_before` - optional creation date filter, 'less'
* `created_after` - optional creation date filter, 'greater'
* `edited_before` - optional last modification date filter, 'less'
* `edited_after` - optional last modification date filter, 'greater'
* `include_org_access` - if set to true and the calling user is the organization admin, the
  method will return all projects in the organization.
* `tags_anyof` - optional tag names filter; matches projects having at least one of the tag
  names. Accepts either tag name strings or [ProjectTag](/sdk-documentation/sdk-references/orm.project#projecttag) instances.

**Returns**:

list of Projects matching filter conditions, as [Project](/sdk-documentation/sdk-references/project#project) instances.

#### list\_project\_tags

```python theme={"dark"}
def list_project_tags() -> List[ProjectTag]
```

List all project tags defined in the Organization.

**Returns**:

* `List[ProjectTag]` - All project tags available in the organization.

#### create\_project

```python theme={"dark"}
def create_project(project_title: str,
                   dataset_hashes: List[str],
                   project_description: str = "",
                   ontology_hash: str = "",
                   workflow_settings:
                   ProjectWorkflowSettings = ManualReviewWorkflowSettings(),
                   workflow_template_hash: Optional[str] = None) -> str
```

Creates a new Project and returns its uid ('project\_hash')

**Arguments**:

* `project_title` - the title of the Project
* `dataset_hashes` - a list of the Dataset uids that the project will use
* `project_description` - the optional description of the project
* `ontology_hash` - the uid of an Ontology to be used. If omitted, a new empty Ontology will be created
* `workflow_settings` - selects and configures the type of the quality control Workflow to use, See [ProjectWorkflowSettings](/sdk-documentation/sdk-references/orm.project#projectworkflowsettings) for details. If omitted, [ManualReviewWorkflowSettings](/sdk-documentation/sdk-references/orm.project#manualreviewworkflowsettings) is used.
* `workflow_template_hash` - Project is created using a Workflow based on the template provided. If omitted, the project will be created using the default standard workflow.

**Returns**:

the uid of the Project.

#### get\_dataset\_client

```python theme={"dark"}
@deprecated("0.1.98", ".get_dataset()")
def get_dataset_client(dataset_hash: str,
                       dataset_access_settings:
                       DatasetAccessSettings = DEFAULT_DATASET_ACCESS_SETTINGS,
                       **kwargs) -> EncordClientDataset
```

DEPRECATED - prefer using [get\_dataset()](/sdk-documentation/sdk-references/user_client#get_dataset) instead.

#### get\_project\_client

```python theme={"dark"}
@deprecated("0.1.98", ".get_project()")
def get_project_client(project_hash: str, **kwargs) -> EncordClientProject
```

DEPRECATED - prefer using [get\_project()](/sdk-documentation/sdk-references/user_client#get_project) instead.

#### create\_project\_from\_cvat\_start

```python theme={"dark"}
def create_project_from_cvat_start(
        *, import_method: ImportMethod, dataset_name: str,
        review_mode: ReviewMode,
        transform_bounding_boxes_to_polygons: bool) -> UUID
```

Start importing a CVAT project into Encord. This is the first part of a two-step import process.
Export your CVAT project with the "CVAT for images 1.1" option and use this function to begin
importing your images and annotations. Ensure that the "Save images" checkbox is enabled when
exporting from CVAT.

**Arguments**:

* `import_method` - The chosen import method. Currently, only LocalImport is supported.
* `dataset_name` - The name of the dataset that will be created.
* `review_mode` - Set how much interaction is needed from the labeler and reviewer for the CVAT labels. See the `ReviewMode` documentation for more details.
* `transform_bounding_boxes_to_polygons` - If True, all instances of CVAT bounding boxes will be converted to polygons in the final Encord project.

**Returns**:

* `UUID` - A unique identifier for tracking the import process.

**Raises**:

ValueError:
If the CVAT directory has an invalid format or if a non-LocalImport method is used.

#### create\_project\_from\_cvat\_get\_result

```python theme={"dark"}
def create_project_from_cvat_get_result(
    cvat_import_uuid: UUID,
    *,
    timeout_seconds: int = 1 * 24 * 60 * 60
) -> Union[CvatImporterSuccess, CvatImporterError]
```

Check the status and get the result of a CVAT import process. This is the second part of the
two-step import process.

**Arguments**:

* `cvat_import_uuid` - The UUID returned by create\_project\_from\_cvat\_start.
* `timeout_seconds` - Maximum time in seconds to wait for the import to complete. Defaults to 24 hours. The method polls the server periodically during this time.

**Returns**:

Union\[CvatImporterSuccess, CvatImporterError]: The result of the import process.

* CvatImporterSuccess: Contains project\_hash, dataset\_hash, and any issues if the import succeeded.
* CvatImporterError: Contains any issues if the import failed.

**Raises**:

* `ValueError` - If the server returns an unexpected status or invalid response structure.

#### create\_project\_from\_cvat

```python theme={"dark"}
def create_project_from_cvat(
    import_method: ImportMethod,
    dataset_name: str,
    review_mode: ReviewMode = ReviewMode.LABELLED,
    *,
    transform_bounding_boxes_to_polygons=False,
    timeout_seconds: int = 1 * 24 * 60 * 60
) -> Union[CvatImporterSuccess, CvatImporterError]
```

Create a new Encord project from a CVAT export. This method combines the two-step import process
(create\_project\_from\_cvat\_start and create\_project\_from\_cvat\_get\_result) into a single call.
Export your CVAT project with the "CVAT for images 1.1" option and use this function to import
your images and annotations. Ensure that the "Save images" checkbox is enabled when exporting
from CVAT.

**Arguments**:

* `import_method` - The chosen import method. Currently, only LocalImport is supported.
* `dataset_name` - The name of the dataset that will be created.
* `review_mode` - Set how much interaction is needed from the labeler and reviewer for the CVAT labels. See the `ReviewMode` documentation for more details. Defaults to ReviewMode.LABELLED.
* `transform_bounding_boxes_to_polygons` - If True, all instances of CVAT bounding boxes will be converted to polygons in the final Encord project. Defaults to False.
* `timeout_seconds` - Maximum time in seconds to wait for the import to complete. Defaults to 24 hours. The method polls the server periodically during this time.

**Returns**:

Union\[CvatImporterSuccess, CvatImporterError]: The result of the import process.

* CvatImporterSuccess: Contains project\_hash, dataset\_hash, and any issues if the import succeeded.
* CvatImporterError: Contains any issues if the import failed.

**Raises**:

ValueError:If the CVAT directory has an invalid format, if a non-LocalImport method is used, or if the server returns an unexpected status.

#### get\_cloud\_integrations

```python theme={"dark"}
def get_cloud_integrations(
        filter_integration_uuids: Optional[Union[List[UUID], List[str],
                                                 List[Union[UUID,
                                                            str]]]] = None,
        filter_integration_titles: Optional[List[str]] = None,
        include_org_access: bool = False) -> List[CloudIntegration]
```

List either all (if called with no arguments) or matching cloud integrations the user has access to.

**Arguments**:

* `filter_integration_uuids` - optional list of integration UUIDs to include.
* `filter_integration_titles` - optional list of integration titles to include (exact match).
* `include_org_access` - if set to true and the calling user is the organization admin, the
  method will return all cloud integrations in the organization.

  If `filter_integration_uuids` and `filter_integration_titles` are both provided, the method will return
  the integrations that match both of the filters.

#### get\_ontologies

```python theme={"dark"}
def get_ontologies(title_eq: Optional[str] = None,
                   title_like: Optional[str] = None,
                   desc_eq: Optional[str] = None,
                   desc_like: Optional[str] = None,
                   created_before: Optional[Union[str, datetime]] = None,
                   created_after: Optional[Union[str, datetime]] = None,
                   edited_before: Optional[Union[str, datetime]] = None,
                   edited_after: Optional[Union[str, datetime]] = None,
                   include_org_access: bool = False) -> List[Dict]
```

List either all (if called with no arguments) or matching ontologies the user has access to.

**Arguments**:

* `title_eq` - optional exact title filter
* `title_like` - optional fuzzy title filter; SQL syntax
* `desc_eq` - optional exact description filter
* `desc_like` - optional fuzzy description filter; SQL syntax
* `created_before` - optional creation date filter, 'less'
* `created_after` - optional creation date filter, 'greater'
* `edited_before` - optional last modification date filter, 'less'
* `edited_after` - optional last modification date filter, 'greater'
* `include_org_access` - if set to true and the calling user is the organization admin, the
  method will return all ontologies in the organization.

**Returns**:

list of ontologies matching filter conditions, with the roles that the current user has on them. Each item
is a dictionary with `"ontology"` and `"user_role"` keys. If include\_org\_access is set to
True, some of the ontologies may have a `None` value for the `"user_role"` key.

#### create\_ontology

```python theme={"dark"}
def create_ontology(title: str,
                    description: str = "",
                    structure: Optional[OntologyStructure] = None) -> Ontology
```

Creates a new ontology with the given title, description, and structure.

**Arguments**:

* `title` *str* - The title of the ontology.
* `description` *str, optional* - A brief description of the ontology. Defaults to an empty string.
* `structure` *Optional\[OntologyStructure], optional* - The structural definition of the ontology. If not provided, a default structure is used.

**Returns**:

* `Ontology` - The newly created ontology object.

**Raises**:

* `ValueError` - If the provided structure contains a classification without any attributes.

#### list\_groups

```python theme={"dark"}
def list_groups() -> Iterator[Group]
```

List all groups belonging to the user's current organization.

**Returns**:

* `Iterator[Group]` - The groups in the organization. See
  [Group](/sdk-documentation/sdk-references/group#group) for details.

#### create\_group

```python theme={"dark"}
def create_group(name: str, description: str = "") -> Group
```

Create a new group in the user's current organization.

The calling user is automatically added as a manager of the new group.

**Arguments**:

* `name` - The name of the group.
* `description` - An optional description of the group.

**Returns**:

* `Group` - The newly created group. See [Group](/sdk-documentation/sdk-references/group#group) for details.

#### get\_group

```python theme={"dark"}
def get_group(group_hash: Union[str, UUID]) -> Group
```

Get a group by its unique identifier (UUID).

**Arguments**:

* `group_hash` - The unique identifier of the group to retrieve.

**Returns**:

* `Group` - The group. See [Group](/sdk-documentation/sdk-references/group#group) for details.

**Raises**:

* `ValueError` - If `group_hash` is a badly formed UUID.
* `[ResourceNotFoundError](/sdk-documentation/sdk-references/exceptions#resourcenotfounderror)` - If no group with the given
  UUID exists in the organization.

#### delete\_group

```python theme={"dark"}
def delete_group(group_hash: Union[str, UUID]) -> None
```

Delete a group and revoke any access it granted to projects and other resources.

**Arguments**:

* `group_hash` - The unique identifier of the group to delete.

**Returns**:

None

**Raises**:

* `ValueError` - If `group_hash` is a badly formed UUID.

#### deidentify\_dicom\_files\_start

```python theme={"dark"}
def deidentify_dicom_files_start(
        dicom_urls: List[str],
        integration_hash: str,
        redact_dicom_tags: bool = True,
        redact_pixels_mode: DeidentifyRedactTextMode = DeidentifyRedactTextMode
    .REDACT_NO_TEXT,
        save_conditions: Optional[List[SaveDeidentifiedDicomCondition]] = None,
        upload_dir: Optional[str] = None) -> UUID
```

Initiate the DICOM files deidentification process.

This method starts the deidentification job for the specified DICOM files and returns
a UUID that can be used to track and retrieve the deidentification job results.

**Arguments**:

* `dicom_urls` - A list of URLs pointing to DICOM files to be deidentified.
* `integration_hash` - Integration hash for the external storage integration.
* `redact_dicom_tags` - Flag to enable or disable DICOM tags redaction. Defaults to True.
* `redact_pixels_mode` - Policy for redacting text in pixel data.
  Defaults to DeidentifyRedactTextMode.REDACT\_NO\_TEXT.
* `save_conditions` - Optional list of conditions that must be met for
  a deidentified DICOM file to be saved.
* `upload_dir` - Optional directory for uploading deidentified files.
  If None, files will be uploaded to the same directory as source files.

**Returns**:

A UUID representing the initiated deidentification job,
which can be used to retrieve job results.

#### deidentify\_dicom\_files\_get\_result

```python theme={"dark"}
def deidentify_dicom_files_get_result(
        dicom_deid_uuid: UUID,
        *,
        timeout_seconds: int = 1 * 24 * 60 * 60) -> List[str]
```

Retrieve the results of a DICOM deidentification job.

This method polls the server to check the status of a previously initiated
DICOM deidentification job and returns the URLs of deidentified files
when the job is complete.

**Arguments**:

* `dicom_deid_uuid` - The UUID of the deidentification job returned by deidentify\_dicom\_files\_start(...).
* `timeout_seconds` - Maximum time to wait for job completion. Defaults to 1 day (86400 seconds).

**Returns**:

A list of URLs pointing to the deidentified DICOM files.

#### deidentify\_dicom\_files

```python theme={"dark"}
def deidentify_dicom_files(
        dicom_urls: List[str],
        integration_hash: str,
        redact_dicom_tags: bool = True,
        redact_pixels_mode: DeidentifyRedactTextMode = DeidentifyRedactTextMode
    .REDACT_NO_TEXT,
        save_conditions: Optional[List[SaveDeidentifiedDicomCondition]] = None,
        upload_dir: Optional[str] = None) -> List[str]
```

Deidentify DICOM files in external storage.
Given links to DICOM files pointing to AWS, GCP, AZURE or OTC, for example:
\[ "[https://s3.region-code.amazonaws.com/bucket-name/dicom-file-input.dcm](https://s3.region-code.amazonaws.com/bucket-name/dicom-file-input.dcm)" ]
Function executes deidentification on those files, it removes all
DICOM tags ([https://dicom.nema.org/medical/Dicom/2017e/output/chtml/part06/chapter\_6.html](https://dicom.nema.org/medical/Dicom/2017e/output/chtml/part06/chapter_6.html))
from metadata except for:

* x00080018 SOPInstanceUID
* x00100010 PatientName
* x00180050 SliceThickness
* x00180088 SpacingBetweenSlices
* x0020000d StudyInstanceUID
* x0020000e SeriesInstanceUID
* x00200032 ImagePositionPatient
* x00200037 ImageOrientationPatient
* x00280008 NumberOfFrames
* x00281050 WindowCenter
* x00281051 WindowWidth
* x00520014 ALinePixelSpacing

**Arguments**:

* `self` - Encord client object.
* `dicom_urls` - a list of urls to DICOM files, for example: `[ "https://s3.region-code.amazonaws.com/bucket-name/dicom-file-input.dcm" ]`
* `integration_hash` - integration\_hash parameter of Encord platform external storage integration
* `redact_dicom_tags` - Specifies if DICOM tags redaction should be enabled.
* `redact_pixels_mode` - Specifies which text redaction policy should be applied to pixel data.
* `save_conditions` - Specifies a list of conditions which all have to be true for DICOM deidentified file to be saved.
* `upload_dir` - Specifies a directory that files will be uploaded to. By default, set to None, deidentified files will be uploaded to the same directory as source files.

**Returns**:

Function returns list of links pointing to deidentified DICOM files,
those will be saved to the same bucket and the same directory
as original files with prefix ( deid\_{timestamp}\_ ).
Example output:
`[ "https://s3.region-code.amazonaws.com/bucket-name/deid_167294769118005312_dicom-file-input.dcm" ]`

#### create\_storage\_folder

```python theme={"dark"}
def create_storage_folder(
    name: str,
    description: Optional[str] = None,
    client_metadata: Optional[Dict[str, Any]] = None,
    parent_folder: Optional[Union[StorageFolder, UUID]] = None,
    cloud_synced_folder_params: Optional[CloudSyncedFolderParams] = None
) -> StorageFolder
```

Create a new storage folder.

**Arguments**:

* `name` - The name of the folder.
* `description` - The description of the folder.
* `client_metadata` - Optional arbitrary metadata to be associated with the folder. Should be a dictionary
  that is JSON-serializable.
* `parent_folder` - The parent folder of the folder; or `None` if the folder is to be created at the root level.
* `cloud_synced_folder_params` - Passing this will create cloud synced folder, leaving this a `None` will create
  a normal folder for further data uploads.

**Returns**:

The created storage folder. See [StorageFolder](/sdk-documentation/sdk-references/storage#storagefolder) for details.

#### get\_storage\_folder

```python theme={"dark"}
def get_storage_folder(folder_uuid: Union[UUID, str]) -> StorageFolder
```

Get a storage folder by its UUID.

**Arguments**:

* `folder_uuid` - The UUID of the folder to retrieve.

**Returns**:

The storage folder. See [StorageFolder](/sdk-documentation/sdk-references/storage#storagefolder) for details.

**Raises**:

* `ValueError` - If `folder_uuid` is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the folder with the given UUID does not exist or
  the user does not have access to it.

#### get\_storage\_item

```python theme={"dark"}
def get_storage_item(item_uuid: Union[UUID, str],
                     sign_url: bool = False) -> StorageItem
```

Get a storage item by its unique identifier.

**Arguments**:

* `item_uuid` - The UUID of the item to retrieve.
* `sign_url` - If `True`, pre-fetch a signed URL for the item (otherwise the URL will be signed on demand).

**Returns**:

The storage item. See [StorageItem](/sdk-documentation/sdk-references/storage#storageitem) for details.

**Raises**:

* `ValueError` - If `item_uuid` is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the item with the given UUID does not exist or
  the user does not have access to it.

#### get\_storage\_items

```python theme={"dark"}
def get_storage_items(item_uuids: Sequence[Union[UUID, str]],
                      sign_url: bool = False) -> List[StorageItem]
```

Get storage items by their UUIDs, in bulk. Useful for retrieving multiple items at once, e.g. when getting
items pointed to by :attr:`encord.orm.dataset.DataRow.backing_item_uuid` for all data rows of a dataset.

**Arguments**:

* `item_uuids` - list of UUIDs of items to retrieve. Can be a list of strings or a list of UUID objects.
* `sign_url` - If `True`, pre-fetch a signed URLs for the items (otherwise the URLs will be signed on demand).

**Returns**:

A list of storage items. See [StorageItem](/sdk-documentation/sdk-references/storage#storageitem) for details. Items will be in the same order as `item_uuids` in the request

**Raises**:

* `ValueError` - If any of the item uuids is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If some of the items with the given UUIDs do not exist or
  the user does not have access to them.

#### list\_storage\_folders

```python theme={"dark"}
def list_storage_folders(*,
                         search: Optional[str] = None,
                         dataset_synced: Optional[bool] = None,
                         org_access: Optional[bool] = None,
                         order: FoldersSortBy = FoldersSortBy.NAME,
                         desc: bool = False,
                         page_size: int = 100) -> Iterable[StorageFolder]
```

List top-level storage folders.

**Arguments**:

* `search` - Search string to filter folders by name (optional)
* `dataset_synced` - Include or exclude folders that are mirrored by a dataset. Optional; if `None`,
  no filtering is applied.
* `org_access` - If `True`, and if the caller is `ADMIN` of their organization, the results contain the
  folders belonging to the organization, instead of those accessible to the user. If enabled
  but the user is not an organization admin, the `AuthorisationError` is raised. Default value is `False`.
* `order` - Sort order for the folders. See [FoldersSortBy](/sdk-documentation/sdk-references/orm.storage#folderssortby) for available options.
* `desc` - If True, sort in descending order.
* `page_size` - Number of folders to return per page. Default if not specified is 100. Maximum value is 1000.

**Returns**:

Iterable of [StorageFolder](/sdk-documentation/sdk-references/storage#storagefolder) objects.

#### find\_storage\_folders

```python theme={"dark"}
def find_storage_folders(*,
                         search: Optional[str] = None,
                         dataset_synced: Optional[bool] = None,
                         org_access: Optional[bool] = None,
                         order: FoldersSortBy = FoldersSortBy.NAME,
                         desc: bool = False,
                         page_size: int = 100) -> Iterable[StorageFolder]
```

Recursively search for storage folders, starting from the top level.

**Arguments**:

* `search` - Search string to filter folders by name (optional)
* `dataset_synced` - Include or exclude folders that are mirrored by a dataset. Optional; if `None`,
  no filtering is applied.
* `org_access` - If `True`, and if the caller is `ADMIN` of their organization, the results contain the
  folders belonging to the organization, instead of those accessible to the user. If enabled
  but the user is not an organization admin, the `AuthorisationError` is raised. Default value is `False`.
* `order` - Sort order for the folders. See [FoldersSortBy](/sdk-documentation/sdk-references/orm.storage#folderssortby) for available options.
* `desc` - If True, sort in descending order.
* `page_size` - Number of folders to return per page. Default if not specified is 100. Maximum value is 1000.

**Returns**:

Iterable of [StorageFolder](/sdk-documentation/sdk-references/storage#storagefolder) objects.

#### find\_storage\_items

```python theme={"dark"}
@deprecated("0.1.180", alternative="EncordUserClient.get_storage_items")
def find_storage_items(*,
                       search: Optional[str] = None,
                       is_in_dataset: Optional[bool] = None,
                       item_types: Optional[List[StorageItemType]] = None,
                       org_access: Optional[bool] = None,
                       order: FoldersSortBy = FoldersSortBy.NAME,
                       desc: bool = False,
                       get_signed_urls: bool = False,
                       page_size: int = 100) -> Iterable[StorageItem]
```

Recursively search for storage items, starting from the root level.

**Warning:** This method is slow. We recommend using `storage_folder.list_items` instead.

**Arguments**:

* `search` - Search string to filter items by name.
* `is_in_dataset` - Filter items by whether they are linked to any dataset. `True` and `False` select
  only linked and only unlinked items, respectively. `None` includes all items regardless of their
  dataset links.
* `item_types` - Filter items by type.
* `org_access` - If `True`, and if the caller is `ADMIN` of their organization, the results contain the
  items belonging to the organization, instead of those accessible to the user. If enabled
  but the user is not an organization admin, the `AuthorisationError` is raised. Default value is `False`.
* `order` - Sort order.
* `desc` - Sort in descending order.
* `get_signed_urls` - If True, return signed URLs for the items.
* `page_size` - Number of items to return per page. Default if not specified is 100. Maximum value is 1000.

  At least one of `search` or `item_types` must be provided.

**Returns**:

Iterable of items in the folder.

#### get\_collection

```python theme={"dark"}
def get_collection(collection_uuid: Union[str, UUID]) -> Collection
```

Get a collection by its unique identifier (UUID).

**Arguments**:

* `collection_uuid` - The unique identifier of the collection to retrieve.

**Returns**:

The collection. See [Collection](/sdk-documentation/sdk-references/collection#collection) for details.

**Raises**:

* `ValueError` - If `collection_uuid` is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the item with the given UUID does not exist or
  the user does not have access to it.

#### list\_collections

```python theme={"dark"}
def list_collections(top_level_folder_uuid: Union[str, UUID, None] = None,
                     collection_uuids: Optional[List[Union[str, UUID]]] = None,
                     page_size: Optional[int] = None) -> Iterator[Collection]
```

Get collections by top level folder or list of collection IDs.
If both top\_level\_folder\_uuid and collection\_uuid\_list are preset
then the intersection of the two conditions is returned.

**Arguments**:

* `top_level_folder_uuid` - The unique identifier of the top level folder.
* `collection_uuids` - The unique identifiers (UUIDs) of the collections to retrieve.
* `page_size` *int* - Number of items to return per page.  Default if not specified is 100. Maximum value is 1000.

**Returns**:

The list of collections which match the given criteria.

**Raises**:

* `ValueError` - If `top_level_folder_uuid` or any of the collection uuids is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the user does not have access to it.

#### delete\_collection

```python theme={"dark"}
def delete_collection(collection_uuid: Union[str, UUID]) -> None
```

Delete a collection by its UUID if it exists.

**Arguments**:

* `collection_uuid` - The unique identifier (UUID) of the collection to delete.

**Returns**:

None

**Raises**:

* `ValueError` - If `collection_uuid` is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the user does not have access to it.

#### create\_collection

```python theme={"dark"}
def create_collection(top_level_folder_uuid: Union[str, UUID],
                      name: str,
                      description: str = "") -> Collection
```

Create a collection.

**Arguments**:

* `top_level_folder_uuid` - The unique identifier (UUID) of the folder that the collection is created in.
* `name` - The name of the collection.
* `description` - The description of the collection.

**Returns**:

* `Collection` - Newly created collection.

**Raises**:

* `ValueError` - If `top_level_folder_uuid` is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the user does not have access to the folder.

#### get\_filter\_preset

```python theme={"dark"}
def get_filter_preset(preset_uuid: Union[str, UUID]) -> FilterPreset
```

Get a preset by its unique identifier (UUID).

**Arguments**:

* `preset_uuid` - The unique identifier of the preset to retrieve.

**Returns**:

The preset. See [FilterPreset](/sdk-documentation/sdk-references/filter_preset#filterpreset) for details.

**Raises**:

* `ValueError` - If `preset_uuid` is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the item with the given UUID does not exist or
  the user does not have access to it.

#### get\_filter\_presets

```python theme={"dark"}
def get_filter_presets(
        preset_uuids: List[Union[str, UUID]] = [],
        page_size: Optional[int] = None) -> Iterator[FilterPreset]
```

Get presets by list of preset unique identifiers (UUIDs).

**Arguments**:

* `preset_uuids` - The list of unique identifiers (UUIDs) to be retrieved.
* `page_size` *int* - Number of items to return per page.  Default if not specified is 100. Maximum value is 1000.

**Returns**:

The list of presets which match the given criteria.

**Raises**:

* `ValueError` - If any of the preset uuids is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the user does not have access to it.

#### list\_presets

```python theme={"dark"}
def list_presets(top_level_folder_uuid: Union[str, UUID, None] = None,
                 page_size: Optional[int] = None) -> Iterator[FilterPreset]
```

Get presets by top level folder.

**Arguments**:

* `top_level_folder_uuid` - The unique identifier of the top level folder.
* `page_size` *int* - Number of items to return per page.  Default if not specified is 100. Maximum value is 1000.

**Returns**:

The list of presets which match the given criteria.

**Raises**:

* `ValueError` - If `top_level_folder_uuid` is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the user does not have access to it.

#### create\_preset

```python theme={"dark"}
def create_preset(name: str,
                  filter_preset_json: dict,
                  description: str = "") -> FilterPreset
```

Create a preset.

**Arguments**:

* `name` - The name of the preset.
* `description` - The description of the preset.
* `filter_preset_json` - The filters for the preset in their raw json format.

**Returns**:

* `FilterPreset` - Newly created collection.

#### delete\_preset

```python theme={"dark"}
def delete_preset(preset_uuid: Union[str, UUID]) -> None
```

Delete a preset by its unique identifier (UUID) if it exists.

**Arguments**:

* `preset_uuid` - The uuid/id of the preset to delete.

**Returns**:

None

**Raises**:

* `ValueError` - If `preset_uuid` is a badly formed UUID.
  [AuthorisationError](/sdk-documentation/sdk-references/exceptions#authorisationerror) : If the user does not have access to it.

## ListingFilter Objects

```python theme={"dark"}
class ListingFilter(Enum)
```

Available properties\_filter keys for get\_projects() and get\_datasets().

The values for *\_before* and *\_after* should be datetime objects.
