Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Themes
The If-Modified-Since header can be used with this resource, with a date format of EEE, dd MMM yyyy HH:mm:ss z. When this header is used, if the object metadata has not changed since the provided date, a 304 Not Modified status code is returned, with no response body.
Syntax
URI: /services/data/vXX.X/theme
Formats: JSON, XML
HTTP methods: GET
Authentication: Authorization: Bearer token
Request body: None
Request parameters: None
Response data
An array of theme items. Each theme item contains the following fields:
| Name | Type | Description |
|---|---|---|
| colors | array of theme colors | Array of theme colors. |
| icons | array of theme icons | Array of theme icons. |
| name | string | Name of the object that the theme colors and icons are associated with. |
Each theme color contains the following fields:
| Name | Type | Description |
|---|---|---|
| color | string | The color described in Web color RGB format, for example, “00FF00”. |
| context | string | The color context, which determines whether the color is the main color (“primary”) for the object, or not. |
| theme | string |
The associated theme. Possible values include:
|
Each theme icon contains the following fields:
| Name | Type | Description |
|---|---|---|
| contentType | string | The icon’s content type, for example, “image/png.” |
| height | number | The icon’s height in pixels. If the icon content type is an SVG type, height and width values are not used. |
| theme | string |
The associated theme. Possible values include:
|
| url | string | The fully qualified URL for this icon. |
| width | number | The icon’s width in pixels. If the icon content type is an SVG type, height and width values are not used. |
Example
1{
2 "themeItems" : [
3 {
4 "name" : "Merchandise__c",
5 "icons" : [
6 {
7 "contentType" : "image/png",
8 "width" : 32,
9 "url" : "https://MyDomainName.my.salesforce.com/img/icon/computer32.png",
10 "height" : 32,
11 "theme" : "theme3"
12 },
13 {
14 "contentType" : "image/png",
15 "width" : 16,
16 "url" : "https://MyDomainName.my.salesforce.com/img/icon/computer16.png",
17 "height" : 16,
18 "theme" : "theme3"
19 } ],
20 "colors" : [
21 {
22 "context" : "primary",
23 "color" : "6666CC",
24 "theme" : "theme3"
25 },
26 {
27 "context" : "primary",
28 "color" : "66895F",
29 "theme" : "theme4"
30 },
31 ...
32 }
33...
34}