> ## 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.

# Orm.collection

## GetCollectionParams Objects

```python theme={"dark"}
class GetCollectionParams(BaseDTO)
```

Query parameters for listing Collections in a top-level folder.

**Arguments**:

* `top_level_folder_uuid` - Optional UUID of the top-level folder to restrict results to.
  If omitted, Collections from all accessible top-level folders
  may be returned.
* `collection_uuids` - Optional list of Collection UUIDs to filter by. If provided,
  only Collections with these UUIDs are returned.
* `page_token` - Token for fetching the next page of results from a previous call.
* `page_size` - Maximum number of Collections to return in a single page.

## CreateCollectionParams Objects

```python theme={"dark"}
class CreateCollectionParams(BaseDTO)
```

Parameters for creating a new Collection in a top-level folder.

**Arguments**:

* `top_level_folder_uuid` - Optional UUID of the top-level folder in which to create the
  Collection. If omitted, the default folder for the user or
  Project context may be used.

## GetCollectionItemsParams Objects

```python theme={"dark"}
class GetCollectionItemsParams(BaseDTO)
```

Query parameters for listing items inside a Collection.

**Arguments**:

* `include_client_metadata` - Optionally include client metadata into the result of this query.
* `page_token` - Token for fetching the next page of Collection items from a previous call.
* `page_size` - Maximum number of items to return in a single page.

## CreateCollectionPayload Objects

```python theme={"dark"}
class CreateCollectionPayload(BaseDTO)
```

Payload for creating a new Collection.

**Arguments**:

* `name` - Human-readable name of the Collection.
* `description` - Optional free-text description of the Collection and its
  intended use.

## UpdateCollectionPayload Objects

```python theme={"dark"}
class UpdateCollectionPayload(BaseDTO)
```

Payload for updating an existing collection.

Any field set to `None` is left unchanged on the server.

**Arguments**:

* `name` - New name for the Collection. If omitted or `None`, the name
  is not updated.
* `description` - New description for the Collection. If omitted or `None`,
  the description is not updated.

## Collection Objects

```python theme={"dark"}
class Collection(BaseDTO)
```

Represents a top-level Collection of items in Index.

Collections are logical groupings of storage items
that can be used for data curation and downstream
workflows.

**Arguments**:

* `uuid` - Unique identifier of the Collection.
* `top_level_folder_uuid` - UUID of the top-level folder that owns this Collection.
* `name` - Human-readable name of the Collection.
* `description` - Optional free-text description of the Collection.
* `created_at` - Timestamp when the Collection was created.
* `last_edited_at` - Timestamp when the Collection was last modified.

## GetCollectionsResponse Objects

```python theme={"dark"}
class GetCollectionsResponse(BaseDTO)
```

Response payload for listing Collections.

**Arguments**:

* `results` - List of Collections matching the query parameters.

## CollectionBulkItemRequest Objects

```python theme={"dark"}
class CollectionBulkItemRequest(BaseDTO)
```

Request payload for bulk operations on Collection items.

**Arguments**:

* `item_uuids` - UUIDs of items to include in the bulk operation. For example,
  to add or remove them from a Collection).

## CollectionBulkItemResponse Objects

```python theme={"dark"}
class CollectionBulkItemResponse(BaseDTO)
```

Response payload for bulk operations on Collection items.

**Arguments**:

* `failed_items` - UUIDs of items for which the bulk operation failed.

## CollectionBulkPresetRequest Objects

```python theme={"dark"}
class CollectionBulkPresetRequest(BaseDTO)
```

Request payload for applying a preset to a Collection in bulk.

**Arguments**:

* `preset_uuid` - UUID of the preset to apply to the Collection.

## ProjectCollectionType Objects

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

Type of a project Collection.

**Values**:

* **FRAME:** The Collection groups frames or data items.
* **LABEL:** The Collection groups labels or annotations.

## GetProjectCollectionParams Objects

```python theme={"dark"}
class GetProjectCollectionParams(BaseDTO)
```

Query parameters for listing project collections.

**Arguments**:

* `project_hash` - UUID of the project whose Collections should be listed.
* `collection_uuids` - Optional list of project Collection UUIDs to filter by.
* `page_token` - Token for fetching the next page of project Collections from
  a previous call.
* `page_size` - Maximum number of project Collections to return in a single page.

## CreateProjectCollectionParams Objects

```python theme={"dark"}
class CreateProjectCollectionParams(BaseDTO)
```

Parameters for creating a new project Collection.

**Arguments**:

* `project_hash` - UUID of the Project in which to create the Collection.

## CreateProjectCollectionPayload Objects

```python theme={"dark"}
class CreateProjectCollectionPayload(CreateCollectionPayload)
```

Payload for creating a new Project Collection.

Inherits the generic collection creation fields and adds the Project
Collection type.

**Arguments**:

* `collection_type` - Type of the Project Collection (frame-based or label-based).

## ProjectCollection Objects

```python theme={"dark"}
class ProjectCollection(BaseDTO)
```

Represents a Collection that is scoped to a specific project.

Project Collections are logical groupings of files or labels from a
single Project that can be used for sampling, review, or other
curation workflows.

**Arguments**:

* `collection_uuid` - UUID of the underlying Collection.
* `name` - Human-readable name of the Project Collection.
* `description` - Optional description of the Project Collection.
* `created_at` - Timestamp when the Project Collection was created.
* `last_edited_at` - Timestamp when the Project Collection was last modified.
* `project_uuid` - UUID of the project this Collection belongs to.
* `collection_type` - Type of the project Collection (frame-based or label-based).

## GetProjectCollectionsResponse Objects

```python theme={"dark"}
class GetProjectCollectionsResponse(BaseDTO)
```

Response payload for listing Project Collections.

**Arguments**:

* `results` - List of Project Collections matching the query parameters.

## ProjectDataCollectionInstance Objects

```python theme={"dark"}
class ProjectDataCollectionInstance(BaseDTO)
```

Represents a single frame instance in a Project data Collection.

**Arguments**:

* `frame` - Frame index within the data item that is part of the Collection.

## ProjectLabelCollectionInstance Objects

```python theme={"dark"}
class ProjectLabelCollectionInstance(BaseDTO)
```

Represents a single label instance in a Project label Collection.

**Arguments**:

* `frame` - Frame index within the data item for which the annotation
  was created.
* `annotation_id` - Identifier of the annotation included in the Collection.

## ProjectDataCollectionItemResponse Objects

```python theme={"dark"}
class ProjectDataCollectionItemResponse(BaseDTO)
```

Response item describing frames included in a Project data Collection.

**Arguments**:

* `label_row_metadata` - Metadata describing the label row associated with the frames.
* `instances` - List of frame instances that are part of the Collection.

## ProjectLabelCollectionItemResponse Objects

```python theme={"dark"}
class ProjectLabelCollectionItemResponse(BaseDTO)
```

Response item describing labels included in a Project label Collection.

**Arguments**:

* `label_row_metadata` - Metadata describing the label row associated with the labels.
* `instances` - List of label instances that are part of the Collection.

## ProjectDataCollectionItemRequest Objects

```python theme={"dark"}
class ProjectDataCollectionItemRequest(BaseDTO)
```

Request payload describing a frame to be added to a Project data Collection.

**Arguments**:

* `data_uuid` - UUID (or string identifier) of the data item containing the frame.
* `frame` - Frame index within the data item to include in the Collection.

## ProjectLabelCollectionItemRequest Objects

```python theme={"dark"}
class ProjectLabelCollectionItemRequest(BaseDTO)
```

Request payload describing a label to be added to a Project label Collection.

**Arguments**:

* `data_uuid` - UUID (or string identifier) of the data item containing the label.
* `frame` - Frame index within the data item for which the annotation
  was created.
* `annotation_id` - Identifier of the annotation to include in the Collection.

## ProjectCollectionBulkItemRequest Objects

```python theme={"dark"}
class ProjectCollectionBulkItemRequest(BaseDTO)
```

Request payload for bulk operations on Project Collection items.

**Arguments**:

* `items` - List of data or label Collection item requests to include in
  the bulk operation.

## ProjectCollectionBulkItemResponse Objects

```python theme={"dark"}
class ProjectCollectionBulkItemResponse(BaseDTO)
```

Response payload for bulk operations on Project Collection items.

**Attributes**:

* `failed_items` - Items for which the bulk operation failed. Each entry contains
  the original request that could not be processed successfully.
