---
schema_version: "1"
id: 9b31c7b895964129b251aba43083b9993cfb3d5e304ff7872042c4cfefb003a5
title: Lens File Resource
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/bi_dev_guide_rest/bi_resources_lenses_id_files_id.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_rest.meta/bi_dev_guide_rest/bi_resources_lenses_id_files_id.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5e1ccdbf47c321a2c1241eac290b7dbbf75946a7141884c2600a9bde0e3da826
description: Returns or updates a file that is part of an Analytics lens.
---
# Lens File Resource

Returns or updates a file that is part of an Analytics lens.

## Resource URL

/wave/lenses/<lensIdOrApiName>/files/<fileId>

## Formats

JSON

## Available Version

36.0

## HTTP Methods

GET PUT

## GET and PUT Request Parameters

| Parameter Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| fileId | Id | The 18 character file ID to return. | Required | 36.0 |
| lens​Id​Or​Api​Name | ID | The lens ID or API name to request the files for. | Required | 36.0 |

## GET Response Body

Returns the binary stream of the contents of the specified file.

## PUT Request Body

The binary upload to update the preview file with.

## PUT Response Body

[Wave File Metadata](https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_rest.meta/bi_dev_guide_rest/bi_responses_wave_file_metadata.htm "The metadata for an Analytics file.")