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

# <content-service>/api/v1/collections/{collectionId}/contents

## URL structure&#x20;

```text theme={null}
https://content-service.xy-company.com/api/v1/collections/{collectionId}/contents
```

where `{collectionId}` is the ID of a folder/collection.

## Supported methods and overview&#x20;

* `DELETE` ( *Deprecated* ) - returns an HTTP response status `200 OK` only. In earlier Cocoon Data Platform versions, this endpoint used to delete the encrypted data associated with all file objects/[Secure Objects](/CS1.2/api/working-with-files-and-folders-fundamentals.md#secure-object) contained within a folder/[collection](/CS1.2/api/working-with-files-and-folders-fundamentals.md#collection) (specified by `collectionId`) from storage managed by the Cocoon Data Platform's Content Service.

> [!NOTE]
>
> This endpoint is deprecated and should no longer be used. Instead, the deletion of all file object data within a folder (including all file object version data) from storage is now automatically handled through `DELETE` method requests to the following endpoints:
>
> * [\<access-service>/api/v1/recycle-bin/items/\{itemId}](/CS1.2/api/access-service-api-v1-recycle-bin-items-itemid.md)
> * [\<access-service>/api/v1/organisations/\{orgId}/recycle-bin/items](/CS1.2/api/access-service-api-v1-organisations-orgid-recycle-bin-items.md)

## Detailed description&#x20;

This API endpoint deletes the encrypted data associated with all file objects contained within a folder (specified by `collectionId`) from storage managed by the Cocoon Data Platform's Content Service.

## Supported roles and conditions&#x20;

This API endpoint supports requests utilizing Cocoon Data user accounts with the following [roles](/CS1.2/admin-org/administering-users-within-an-organisation.md#an-organisation-users-roles) (as described in the [Organisation Administrator's Guide](/CS1.2/admin-org.md)) and conditions:

* [Originator](/CS1.2/admin-org/administering-users-within-an-organisation.md#originator-role) - when this user owns the folder whose ID is specified by `{collectionId}` in the request's URL.
* **Originator**, [Collaborator](/CS1.2/admin-org/administering-users-within-an-organisation.md#collaborator-role) and [Ad hoc](/CS1.2/admin-org/administering-users-within-an-organisation.md#adhoc-role) - when this user is a collaborator with the **Remove (Folder)** permission on the folder whose ID is specified by `{collectionId}` in the URL.

The Cocoon Data Platform's resources available to one of these Cocoon Data users (above) is determined by the access token submitted in the [header](/CS1.2/api/content-service-api-v1-collections-collectionid-contents.md#content-service-api-v1-collections-collectionid-contents-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...`

## Returns&#x20;

If the request succeeded, then an HTTP response status `200 OK` is returned.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.