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

# <access-service>/api/v1/objects/{objectId}/keys/view

## URL structure&#x20;

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

where \{objectId} is the ID of a Secure Object.

## Supported methods and overview&#x20;

* `GET` - used to retrieve the cryptographic key required to decrypt the *read-only view* of a [Secure Object](/3.1/api/creating-secure-objects-and-collections.md#secure-object), based on the Secure Object's ID.

> [!NOTE]
>
> This method takes no parameters.

## Detailed description&#x20;

This API endpoint retrieves the cryptographic key required to decrypt the *read-only view* of a Secure Object, using the Secure Object's ID.

This key is generated after [uploading](/3.1/api/content-service-api-v1-objects-objectid-contents.md) a Secure Object's data to storage *and* both of the following criteria have been met:

* The Secure Object's file name (i.e. its **name** value) contains an [extension](/3.1/user/accessing-secure-content.md#file-formats-supported-by-the-content-viewer) which is supported by Safe Share's [content viewer](/3.1/user/accessing-secure-content.md#content-viewer).
* The size of the file in its unencrypted form (i.e. its **contentSize** value) is less than the default of 20,000,000 bytes.

A Secure Object's ID can be obtained by calling the [\<access-service>/api/v1/items](/3.1/api/access-service-api-v1-items.md) API endpoint, which retrieves a list of information associated with Secure Objects that can be filtered using various 'search' criteria.

## Supported roles and conditions&#x20;

This API endpoint supports the following Covata user [roles](/3.1/admin/administering-users.md#a-users-roles) (as described in the [Covata Platform Administrator's Guide](/3.1/admin.md)) and conditions:

* [Originator](/3.1/admin/administering-users.md#originator-role) - a Covata user with this role can call this endpoint on a Secure Object they own.
* **Originator**, [Collaborator](/3.1/admin/administering-users.md#collaborator-role) and [Ad hoc](/3.1/admin/administering-users.md#adhoc-role) - a Covata user with any of these roles can call this endpoint for a Secure Object they are a collaborator on.

The Covata Platform's resources available to one of these Covata users (above) is determined by the access token passed in the [header](/3.1/api/access-service-api-v1-objects-objectid-keys-view.md#access-service-api-v1-objects-objectid-keys-view-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorization: Bearer a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6`

## Returns&#x20;

A JSON-formatted response containing the following members:

* **keyValue** - .
* **cryptographicAlgorithm** - .
* **keyLength** - .
* **initializationVector** - .

  **Example:**

  ```json theme={null}
  {
    "keyValue": "2VCZkPeYPhvL4VkzrEqIVGaW2AGmRM1uwuXiPRbe8NU=",
    "cryptographicAlgorithm": "AES",
    "keyLength": 256,
    "initializationVector": "fpEIYIk+dnMw7rgFA+Bz8g=="
  }
  ```


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