Newer Version Available

This content describes an older version of this product. View Latest

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

Usage

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