# Collections

## List all collections in a specific drive

> Get a listing of all the collections in the database

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections":{"get":{"tags":["collections"],"summary":"List all collections in a specific drive","description":"Get a listing of all the collections in the database","operationId":"get_drive_collections_collections_get","parameters":[{"name":"drive_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id","description":"The id of the drive we want to get collections from"},"description":"The id of the drive we want to get collections from"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_drive_collections_collections_get"}}}},"responses":{"200":{"description":"A list of all collections in the specified drive.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionDTO"},"title":"Response Get Drive Collections Collections Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_drive_collections_collections_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_drive_collections_collections_get"},"CollectionDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"is_public_enabled":{"type":"boolean","title":"Is Public Enabled"},"allowed_actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Allowed Actions"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"settings":{"$ref":"#/components/schemas/CollectionSettings-Output"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"icon":{"type":"string","title":"Icon"},"icon_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"background_image":{"type":"string","title":"Background Image"},"background_image_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"preview_image":{"anyOf":[{"$ref":"#/components/schemas/PreviewDTO"},{"type":"null"}]},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"password_protected":{"type":"boolean","title":"Password Protected"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["id","name","description","drive_id","created_by","is_public_enabled","allowed_actions","invite_id","settings","icon_type","icon","background_image","password_protected"],"title":"CollectionDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action"},"CollectionSettings-Output":{"properties":{"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"sort":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSort"},{"type":"null"}]}},"type":"object","title":"CollectionSettings"},"CollectionSettingSort":{"properties":{"attribute":{"type":"string","title":"Attribute"},"direction":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSortDirection"},{"type":"null"}]}},"type":"object","required":["attribute"],"title":"CollectionSettingSort"},"CollectionSettingSortDirection":{"type":"string","enum":["ASC","DESC","CUSTOM"],"title":"CollectionSettingSortDirection"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"AttachmentToDownloadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","download_url"],"title":"AttachmentToDownloadDTO"},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Create a collection

> Create a new user collection of assets

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections":{"post":{"tags":["collections"],"summary":"Create a collection","description":"Create a new user collection of assets","operationId":"create_collection_collections_post","parameters":[{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_collection_collections_post"}}}},"responses":{"200":{"description":"The id of the created user collection","content":{"application/json":{"schema":{"type":"string","format":"uuid","title":"Response Create Collection Collections Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_create_collection_collections_post":{"properties":{"name":{"type":"string","title":"The name of the user collection","description":"The name of the user collection to be created"},"description":{"type":"string","title":"The description of the user collection","description":"The description of the user collection to be created","default":""},"drive_id":{"type":"string","format":"uuid","title":"The drive id","description":"The id of the drive to create the collection in"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["name","drive_id"],"title":"Body_create_collection_collections_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get a collection by its id

> Get a collection by id

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}":{"get":{"tags":["collections"],"summary":"Get a collection by its id","description":"Get a collection by id","operationId":"get_collection_collections__collection_id__get","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id"}},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_collection_collections__collection_id__get"}}}},"responses":{"200":{"description":"The collection","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FullCollectionDTO"},{"type":"null"}],"title":"Response Get Collection Collections  Collection Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_collection_collections__collection_id__get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_collection_collections__collection_id__get"},"FullCollectionDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"is_public_enabled":{"type":"boolean","title":"Is Public Enabled"},"allowed_actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Allowed Actions"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"settings":{"$ref":"#/components/schemas/CollectionSettings-Output"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"icon":{"type":"string","title":"Icon"},"icon_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"background_image":{"type":"string","title":"Background Image"},"background_image_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"preview_image":{"anyOf":[{"$ref":"#/components/schemas/PreviewDTO"},{"type":"null"}]},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"password_protected":{"type":"boolean","title":"Password Protected"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"},"num_assets":{"type":"integer","title":"Num Assets"},"num_directories":{"type":"integer","title":"Num Directories"},"size":{"type":"number","title":"Size"}},"type":"object","required":["id","name","description","drive_id","created_by","is_public_enabled","allowed_actions","invite_id","settings","icon_type","icon","background_image","password_protected","num_assets","num_directories","size"],"title":"FullCollectionDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action"},"CollectionSettings-Output":{"properties":{"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"sort":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSort"},{"type":"null"}]}},"type":"object","title":"CollectionSettings"},"CollectionSettingSort":{"properties":{"attribute":{"type":"string","title":"Attribute"},"direction":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSortDirection"},{"type":"null"}]}},"type":"object","required":["attribute"],"title":"CollectionSettingSort"},"CollectionSettingSortDirection":{"type":"string","enum":["ASC","DESC","CUSTOM"],"title":"CollectionSettingSortDirection"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"AttachmentToDownloadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","download_url"],"title":"AttachmentToDownloadDTO"},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Update a collection

> Update a collection

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}":{"put":{"tags":["collections"],"summary":"Update a collection","description":"Update a collection","operationId":"update_collection_collections__collection_id__put","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to be updated"},"description":"The id of the collection to be updated"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_collection_collections__collection_id__put"}}}},"responses":{"200":{"description":"The updated collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_update_collection_collections__collection_id__put":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection name","description":"The new name for the collection"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection description","description":"The new description for the collection"},"is_public_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is public visible"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"icon_type":{"anyOf":[{"$ref":"#/components/schemas/DriveIconType"},{"type":"null"}],"title":"Icon type"},"allowed_actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Action"},"type":"array"},{"type":"null"}],"title":"Allowed Actions"},"background_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"background_image"},"settings":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettings-Input"},{"type":"null"}],"title":"Settings"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"The expiration date of the collection","description":"The expiration date of the collection"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password of the collection","description":"The password of the collection"},"removed_password":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Removed password","description":"remove the collection password","default":false},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_update_collection_collections__collection_id__put"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action"},"CollectionSettings-Input":{"properties":{"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"sort":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSort"},{"type":"null"}]}},"type":"object","title":"CollectionSettings"},"CollectionSettingSort":{"properties":{"attribute":{"type":"string","title":"Attribute"},"direction":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSortDirection"},{"type":"null"}]}},"type":"object","required":["attribute"],"title":"CollectionSettingSort"},"CollectionSettingSortDirection":{"type":"string","enum":["ASC","DESC","CUSTOM"],"title":"CollectionSettingSortDirection"},"CollectionDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"is_public_enabled":{"type":"boolean","title":"Is Public Enabled"},"allowed_actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Allowed Actions"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"settings":{"$ref":"#/components/schemas/CollectionSettings-Output"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"icon":{"type":"string","title":"Icon"},"icon_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"background_image":{"type":"string","title":"Background Image"},"background_image_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"preview_image":{"anyOf":[{"$ref":"#/components/schemas/PreviewDTO"},{"type":"null"}]},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"password_protected":{"type":"boolean","title":"Password Protected"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["id","name","description","drive_id","created_by","is_public_enabled","allowed_actions","invite_id","settings","icon_type","icon","background_image","password_protected"],"title":"CollectionDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"CollectionSettings-Output":{"properties":{"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"sort":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSort"},{"type":"null"}]}},"type":"object","title":"CollectionSettings"},"AttachmentToDownloadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","download_url"],"title":"AttachmentToDownloadDTO"},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Delete a collection

> Delete a collection

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}":{"delete":{"tags":["collections"],"summary":"Delete a collection","description":"Delete a collection","operationId":"delete_collection_collections__collection_id__delete","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to be deleted"},"description":"The id of the collection to be deleted"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_collection_collections__collection_id__delete"}}}},"responses":{"200":{"description":"True if the collection was deleted, false if it was not found","content":{"application/json":{"schema":{"type":"boolean","title":"Response Delete Collection Collections  Collection Id  Delete"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_delete_collection_collections__collection_id__delete":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_delete_collection_collections__collection_id__delete"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get an MRSS feed for a collection

> Return an MRSS (Media RSS) feed for a collection.\
> \
> This endpoint is intended for public consumption and only returns data when\
> the collection's public link visibility is enabled. If the collection is\
> not public or is expired, a 404 is returned. If the collection is\
> password-protected and the password is incorrect, a 403 is returned.

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/mrss":{"get":{"tags":["collections"],"summary":"Get an MRSS feed for a collection","description":"Return an MRSS (Media RSS) feed for a collection.\n\nThis endpoint is intended for public consumption and only returns data when\nthe collection's public link visibility is enabled. If the collection is\nnot public or is expired, a 404 is returned. If the collection is\npassword-protected and the password is incorrect, a 403 is returned.","operationId":"get_collection_mrss_collections__collection_id__mrss_get","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"title":"Page number","description":"1-indexed page of assets in the collection to return.","default":1},"description":"1-indexed page of assets in the collection to return."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"title":"Page size","description":"Maximum number of assets to include in the MRSS feed.","default":20},"description":"Maximum number of assets to include in the MRSS feed."},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_collection_mrss_collections__collection_id__mrss_get"}}}},"responses":{"200":{"description":"An MRSS XML feed for the public collection","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_collection_mrss_collections__collection_id__mrss_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_collection_mrss_collections__collection_id__mrss_get"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Add assets to a collection

> Add assets to a collection, if they are in the same drive.

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/assets":{"post":{"tags":["collections"],"summary":"Add assets to a collection","description":"Add assets to a collection, if they are in the same drive.","operationId":"add_assets_to_collection_route_collections__collection_id__assets_post","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to add assets to"},"description":"The id of the collection to add assets to"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_add_assets_to_collection_route_collections__collection_id__assets_post"}}}},"responses":{"200":{"description":"The updated collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_add_assets_to_collection_route_collections__collection_id__assets_post":{"properties":{"asset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"The asset ids to add to the collection","description":"The ids of the assets to add to the collection","default":[]},"directory_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"The directory paths","description":"Add all assets under these paths to the collection","default":[]},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_add_assets_to_collection_route_collections__collection_id__assets_post"},"CollectionDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"is_public_enabled":{"type":"boolean","title":"Is Public Enabled"},"allowed_actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Allowed Actions"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"settings":{"$ref":"#/components/schemas/CollectionSettings-Output"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"icon":{"type":"string","title":"Icon"},"icon_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"background_image":{"type":"string","title":"Background Image"},"background_image_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"preview_image":{"anyOf":[{"$ref":"#/components/schemas/PreviewDTO"},{"type":"null"}]},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"password_protected":{"type":"boolean","title":"Password Protected"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["id","name","description","drive_id","created_by","is_public_enabled","allowed_actions","invite_id","settings","icon_type","icon","background_image","password_protected"],"title":"CollectionDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action"},"CollectionSettings-Output":{"properties":{"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"sort":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSort"},{"type":"null"}]}},"type":"object","title":"CollectionSettings"},"CollectionSettingSort":{"properties":{"attribute":{"type":"string","title":"Attribute"},"direction":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSortDirection"},{"type":"null"}]}},"type":"object","required":["attribute"],"title":"CollectionSettingSort"},"CollectionSettingSortDirection":{"type":"string","enum":["ASC","DESC","CUSTOM"],"title":"CollectionSettingSortDirection"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"AttachmentToDownloadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","download_url"],"title":"AttachmentToDownloadDTO"},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Remove assets from a collection

> Remove assets from a collection

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/assets":{"delete":{"tags":["collections"],"summary":"Remove assets from a collection","description":"Remove assets from a collection","operationId":"delete_collection_assets_collections__collection_id__assets_delete","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to remove a file from"},"description":"The id of the collection to remove a file from"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_collection_assets_collections__collection_id__assets_delete"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_delete_collection_assets_collections__collection_id__assets_delete":{"properties":{"asset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"The asset ids","description":"The ids of the assets to remove from the collection"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["asset_ids"],"title":"Body_delete_collection_assets_collections__collection_id__assets_delete"},"CollectionDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"is_public_enabled":{"type":"boolean","title":"Is Public Enabled"},"allowed_actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Allowed Actions"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"settings":{"$ref":"#/components/schemas/CollectionSettings-Output"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"icon":{"type":"string","title":"Icon"},"icon_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"background_image":{"type":"string","title":"Background Image"},"background_image_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"preview_image":{"anyOf":[{"$ref":"#/components/schemas/PreviewDTO"},{"type":"null"}]},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"password_protected":{"type":"boolean","title":"Password Protected"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["id","name","description","drive_id","created_by","is_public_enabled","allowed_actions","invite_id","settings","icon_type","icon","background_image","password_protected"],"title":"CollectionDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action"},"CollectionSettings-Output":{"properties":{"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"sort":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSort"},{"type":"null"}]}},"type":"object","title":"CollectionSettings"},"CollectionSettingSort":{"properties":{"attribute":{"type":"string","title":"Attribute"},"direction":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSortDirection"},{"type":"null"}]}},"type":"object","required":["attribute"],"title":"CollectionSettingSort"},"CollectionSettingSortDirection":{"type":"string","enum":["ASC","DESC","CUSTOM"],"title":"CollectionSettingSortDirection"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"AttachmentToDownloadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","download_url"],"title":"AttachmentToDownloadDTO"},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Move an asset to a new position in the collection

> Move a single asset to a new position in the collection.\
> Only updates the assets affected by the move.

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/assets/order":{"post":{"tags":["collections"],"summary":"Move an asset to a new position in the collection","description":"Move a single asset to a new position in the collection.\nOnly updates the assets affected by the move.","operationId":"update_collection_asset_order_collections__collection_id__assets_order_post","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection whose asset order will be updated"},"description":"The id of the collection whose asset order will be updated"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_collection_asset_order_collections__collection_id__assets_order_post"}}}},"responses":{"200":{"description":"Success status","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_update_collection_asset_order_collections__collection_id__assets_order_post":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"The asset id","description":"The id of the asset to move"},"new_order":{"type":"integer","title":"The new position","description":"The new position for the asset (1-indexed)"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["asset_id","new_order"],"title":"Body_update_collection_asset_order_collections__collection_id__assets_order_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get directory paths from a collection

> Get the directory paths from a collection

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/directories":{"get":{"tags":["collections"],"summary":"Get directory paths from a collection","description":"Get the directory paths from a collection","operationId":"get_directories_from_collection_collections__collection_id__directories_get","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to get directory paths from"},"description":"The id of the collection to get directory paths from"},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query","description":"Optional query to filter directory paths"},"description":"Optional query to filter directory paths"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_directories_from_collection_collections__collection_id__directories_get"}}}},"responses":{"200":{"description":"The directory paths included in the collection","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Directories From Collection Collections  Collection Id  Directories Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_directories_from_collection_collections__collection_id__directories_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_directories_from_collection_collections__collection_id__directories_get"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Add directory paths to a collection

> Add directory paths to a collection.

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/directories":{"post":{"tags":["collections"],"summary":"Add directory paths to a collection","description":"Add directory paths to a collection.","operationId":"add_directories_to_collection_route_collections__collection_id__directories_post","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to add directory paths to"},"description":"The id of the collection to add directory paths to"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_add_directories_to_collection_route_collections__collection_id__directories_post"}}}},"responses":{"200":{"description":"The updated collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_add_directories_to_collection_route_collections__collection_id__directories_post":{"properties":{"directory_paths":{"items":{"type":"string"},"type":"array","title":"The directory paths to add to the collection","description":"The paths of the directories to add to the collection"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["directory_paths"],"title":"Body_add_directories_to_collection_route_collections__collection_id__directories_post"},"CollectionDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"is_public_enabled":{"type":"boolean","title":"Is Public Enabled"},"allowed_actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Allowed Actions"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"settings":{"$ref":"#/components/schemas/CollectionSettings-Output"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"icon":{"type":"string","title":"Icon"},"icon_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"background_image":{"type":"string","title":"Background Image"},"background_image_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"preview_image":{"anyOf":[{"$ref":"#/components/schemas/PreviewDTO"},{"type":"null"}]},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"password_protected":{"type":"boolean","title":"Password Protected"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["id","name","description","drive_id","created_by","is_public_enabled","allowed_actions","invite_id","settings","icon_type","icon","background_image","password_protected"],"title":"CollectionDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action"},"CollectionSettings-Output":{"properties":{"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"sort":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSort"},{"type":"null"}]}},"type":"object","title":"CollectionSettings"},"CollectionSettingSort":{"properties":{"attribute":{"type":"string","title":"Attribute"},"direction":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSortDirection"},{"type":"null"}]}},"type":"object","required":["attribute"],"title":"CollectionSettingSort"},"CollectionSettingSortDirection":{"type":"string","enum":["ASC","DESC","CUSTOM"],"title":"CollectionSettingSortDirection"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"AttachmentToDownloadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","download_url"],"title":"AttachmentToDownloadDTO"},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Remove directory paths from a collection

> Remove directory paths from a collection

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/directories":{"delete":{"tags":["collections"],"summary":"Remove directory paths from a collection","description":"Remove directory paths from a collection","operationId":"delete_collection_directories_collections__collection_id__directories_delete","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to remove directory paths from"},"description":"The id of the collection to remove directory paths from"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_collection_directories_collections__collection_id__directories_delete"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_delete_collection_directories_collections__collection_id__directories_delete":{"properties":{"directory_paths":{"items":{"type":"string"},"type":"array","title":"The directory paths","description":"The paths of the directories to remove from the collection"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["directory_paths"],"title":"Body_delete_collection_directories_collections__collection_id__directories_delete"},"CollectionDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserDTOBase"},{"type":"null"}]},"is_public_enabled":{"type":"boolean","title":"Is Public Enabled"},"allowed_actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Allowed Actions"},"invite_id":{"type":"string","format":"uuid","title":"Invite Id"},"settings":{"$ref":"#/components/schemas/CollectionSettings-Output"},"icon_type":{"$ref":"#/components/schemas/DriveIconType"},"icon":{"type":"string","title":"Icon"},"icon_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"background_image":{"type":"string","title":"Background Image"},"background_image_attachment":{"anyOf":[{"$ref":"#/components/schemas/AttachmentToDownloadDTO"},{"type":"null"}]},"preview_image":{"anyOf":[{"$ref":"#/components/schemas/PreviewDTO"},{"type":"null"}]},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"password_protected":{"type":"boolean","title":"Password Protected"},"expiration_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["id","name","description","drive_id","created_by","is_public_enabled","allowed_actions","invite_id","settings","icon_type","icon","background_image","password_protected"],"title":"CollectionDTO"},"UserDTOBase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"avatar_url":{"type":"string","title":"Avatar Url"},"user_type":{"$ref":"#/components/schemas/UserType"}},"type":"object","required":["id","name","email","avatar_url","user_type"],"title":"UserDTOBase"},"UserType":{"type":"string","enum":["regular","group"],"title":"UserType"},"Action":{"type":"string","enum":["manage","edit","share","comment","edit_metadata","download","read","read_asset_details","read_metadata","manage_webhooks","manage_drive","view_stack_versions"],"title":"Action"},"CollectionSettings-Output":{"properties":{"card_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Size"},"thumbnail_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail View"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"},"metadata_attribute_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute Ids"},"sort":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSort"},{"type":"null"}]}},"type":"object","title":"CollectionSettings"},"CollectionSettingSort":{"properties":{"attribute":{"type":"string","title":"Attribute"},"direction":{"anyOf":[{"$ref":"#/components/schemas/CollectionSettingSortDirection"},{"type":"null"}]}},"type":"object","required":["attribute"],"title":"CollectionSettingSort"},"CollectionSettingSortDirection":{"type":"string","enum":["ASC","DESC","CUSTOM"],"title":"CollectionSettingSortDirection"},"DriveIconType":{"type":"string","enum":["color","emoji","attachment"],"title":"DriveIconType"},"AttachmentToDownloadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","download_url"],"title":"AttachmentToDownloadDTO"},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Start the upload process for a collection attachment

> Start the upload process for a collection attachment

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/attachments":{"post":{"tags":["collections"],"summary":"Start the upload process for a collection attachment","description":"Start the upload process for a collection attachment","operationId":"start_collection_attachment_upload_collections__collection_id__attachments_post","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to create the attachment for"},"description":"The id of the collection to create the attachment for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_start_collection_attachment_upload_collections__collection_id__attachments_post"}}}},"responses":{"200":{"description":"The id of the created user collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentToUploadDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_start_collection_attachment_upload_collections__collection_id__attachments_post":{"properties":{"drive_id":{"type":"string","format":"uuid","title":"The drive id","description":"The id of the drive to create the attachment for"},"name":{"type":"string","title":"The name of the attachment","description":"The name of the attachment to be created"},"mime_type":{"type":"string","title":"The mime type of the attachment","description":"The mime type of the attachment to be created"},"size":{"type":"integer","title":"The size of the attachment","description":"The size of the attachment to be created"},"upload_for":{"type":"string","enum":["icon","background"],"title":"What the upload is for","description":"What the upload is for ('icon' or 'background')"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["drive_id","name","mime_type","size","upload_for"],"title":"Body_start_collection_attachment_upload_collections__collection_id__attachments_post"},"AttachmentToUploadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"upload_url":{"type":"string","title":"Upload Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","upload_url"],"title":"AttachmentToUploadDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Mark the upload of a collection attachment as complete

> Mark the upload of a collection attachment as complete

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/collections/{collection_id}/attachments/{attachment_id}":{"post":{"tags":["collections"],"summary":"Mark the upload of a collection attachment as complete","description":"Mark the upload of a collection attachment as complete","operationId":"mark_collection_attachment_uploaded_collections__collection_id__attachments__attachment_id__post","parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The collection id","description":"The id of the collection to mark the attachment uploaded for"},"description":"The id of the collection to mark the attachment uploaded for"},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The attachment id","description":"The id of the attachment to mark as uploaded"},"description":"The id of the attachment to mark as uploaded"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_mark_collection_attachment_uploaded_collections__collection_id__attachments__attachment_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentToDownloadDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_mark_collection_attachment_uploaded_collections__collection_id__attachments__attachment_id__post":{"properties":{"drive_id":{"type":"string","format":"uuid","title":"The drive id","description":"The id of the drive to mark the attachment uploaded for"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["drive_id"],"title":"Body_mark_collection_attachment_uploaded_collections__collection_id__attachments__attachment_id__post"},"AttachmentToDownloadDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"uploader_id":{"type":"string","format":"uuid","title":"Uploader Id"},"uploaded":{"type":"boolean","title":"Uploaded"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["id","drive_id","uploader_id","uploaded","name","mime_type","size","download_url"],"title":"AttachmentToDownloadDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.shade.inc/developers/collections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
