---
schema_version: "1"
id: 3d2d74e82982225ae09e8370bf2542d90f35e9e9c5ad00aebc5ff4823042ea16
title: StaticResource
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_staticresource.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_staticresource.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 99548d9598472ce0b183431153bd97cc7e71d3c91bf991cad6cda22a6c6c4ef3
description: Represents the working copy of a static resource file for editing or saving. Static resources allow you to upload content that you can reference in a Visualforce page, including images, stylesheets, JavaScript, and other files. Available in Tooling API version 29.0 and later.
---
# StaticResource

Represents the working copy of a static resource file for editing or saving. Static resources allow you to upload content that you can reference in a Visualforce page, including images, stylesheets, JavaScript, and other files. Available in Tooling API version 29.0 and later.

## Supported SOAP API Calls

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

## Supported REST API HTTP Methods

Query, GET, POST, PATCH, DELETE

## Fields

| Field Name | Details |
| --- | --- |
| Body | 
Type

string

Properties

Create, Update

Description

The data for the static resource file.



 |
| ContentType | 

Type

string

Properties

Create, Update

Description

Required. The content type of the file, for example text/plain.



 |
| CacheControl | 

Type

string

Properties

Create, Update

Description

Required. Indicates whether the static resource is marked with a public caching tag so that a third-party delivery client can cache the content.  The valid values are:

- Private
- Public





 |
| ManageableState | 

Type

ManageableState enumerated list

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Indicates the manageable state of the specified component that is contained in a package:

- beta
- deleted
- deprecated
- deprecatedEditable
- installed
- installedEditable
- released
- unmanaged





 |
| Name | 

Type

string

Properties

Create, Update

Description

The static resource name. The name can only contain characters, letters, and the underscore (\_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters



 |

## Usage

To create, edit, or save a static resource file, create a StaticResource object that references it.