> ## 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/objects/{objectId}/view

## URL structure&#x20;

```text theme={null}
https://content-service.xy-company.com/api/v1/objects/{objectId}/view
```

where `{objectId}` is the ID of a file object/Secure Object.

## Supported methods and overview&#x20;

* `GET` - downloads the encrypted *read-only view* data of a file object/[Secure Object](/3.4/api/working-with-files-and-folders-fundamentals.md#secure-object) (specified by `objectId`) from storage via the Covata Platform's Content Service.
* `PUT` - regenerates the *read-only view* of a file object (specified by `objectId`) based on the file object's actual data, which is also stored and managed by the Content Service.

> [!NOTE]
>
> * The `PUT` method take no parameters.
> * All methods above work with the active version of the file object (specified by `objectId`).

## Detailed description&#x20;

This API endpoint serves a number of purposes, all of which are managed by the Covata Platform's Content Service:

* Downloads the encrypted *read-only view* data of a file object (specified by `objectId`) from storage. \

  **Note:** The key required to decrypt this *read-only view* can be obtained by calling the [\<access-service>/api/v1/objects/\{objectId}/keys/view](/3.4/api/access-service-api-v1-objects-objectid-keys-view.md) API endpoint.
* Regenerates the *read-only view* of a file object (specified by `objectId`) based on the file object's actual data in storage.

## Supported roles and conditions&#x20;

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

* [Originator](/3.4/admin-org/administering-users-within-an-organisation.md#originator-role) - using the `GET` and `PUT` methods when this user owns the file object whose ID is specified by `{objectId}` in the request's URL.
* **Originator**, [Collaborator](/3.4/admin-org/administering-users-within-an-organisation.md#collaborator-role) and [Ad hoc](/3.4/admin-org/administering-users-within-an-organisation.md#adhoc-role) - using the `GET` method when this user is a collaborator with the **View** [permission](/3.4/api/access-service-api-v1-permissions-sets.md) on the file object whose ID is specified by `{objectId}` in the URL.

The Covata Platform's resources available to a Covata user meeting the criteria above is determined by the access token submitted in the [header](/3.4/api/content-service-api-v1-objects-objectid-view.md#content-service-api-v1-objects-objectid-view-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

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

## Optional parameters&#x20;

The following optional parameter can be sent in the **URL** of the GET request:

* **encoding** - Specify the value `base64` to download the encrypted view as [Base64](https://tools.ietf.org/html/rfc4648)-encoded data. Otherwise, omit this parameter to download the encrypted view as raw/binary data. In both cases, the `Content-Type` in the response is `application/octet-stream`.

  **Example:**

  ```text theme={null}
  https://content-service.xy-company.com/api/v1/objects/987654321098765432/view?encoding=base64
  ```

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