Dashboard Results

Can return metadata, data, and status for the specified dashboard. Can also refresh, save, or delete a dashboard.

Syntax 

URI: /services/data/vXX.X/analytics/dashboards/dashboardID

Or, with optional parameters:

/services/data/vXX.X/analytics/dashboards/dashboardID?runningUser=runningUserID&filter1=filter1ID&filter2=filter2ID&filter3=filter3ID

Formats: JSON

HTTP methods

MethodDescription
GETReturns metadata, data, and status for the specified dashboard. See this example.
POSTReturns details about one or more dashboard components from a specified dashboard. See this example.
PUTTriggers a dashboard refresh. See this example.
PATCHSaves a dashboard. See this example.
DELETEDeletes a dashboard. See this example.

Authentication: Authorization: Bearer token

Parameters

The following optional parameters can be used with the GET and PUT methods:

Parameter NameDescription
runningUserIdentifier of the running user. Gives an error if the user is not allowed to change the running user, or if the selected running user is invalid.
filter1Identifier of the selected filter option for the first filter. Gives an error if the filter option is invalid.
filter2Identifier of the selected filter option for the second filter. Gives an error if the filter option is invalid.
filter3Identifier of the selected filter option for the third filter. Gives an error if the filter option is invalid.
isStickyFilterSaveAppend to a PATCH request. When true, saves any dashboard filters set in the request so that they’re also set the next time you open the dashboard. You can only set dashboard filters for yourself, not for other users.

GET, POST, and PUT Response body 

PropertyTypeDescription
componentDataComponent data[]Ordered array containing data and status for each component of the dashboard.
dashboardMetadataDashboard metadataMetadata for the entire dashboard.

Attributes

PropertyTypeDescription
dashboardIdStringUnique identifier of dashboard.
dashboardNameStringDashboard name.
statusUrlUrlThe URL of the status resource for the dashboard.
typeStringThis property is always set to Dashboard.

Component data

PropertyTypeDescription
componentIdStringUnique identifier of the component.
reportResultReport resultsReport metadata and summary data for the dashboard component. Uses the same data format as the Report API.
statusComponent statusQueue and data status of the component.

Component status

PropertyTypeDescription
dataStatusStringStatus of the data set of the component. Value can be NODATA (the data set was never generated or is invalid due to a change in the report), DATA (the data set is available and was last refreshed at the refreshDate), or ERROR (a component error has occurred; details can be found in errorCode, errorMessage, and errorSeverity).
errorCodeStringUnique identifier of error message. This property is only populated in case of error.
errorMessageStringLocalized error message. This property is only populated in case of error.
errorSeverityStringSeverity of error code and message. Value can be Error or Warning. This property is only populated in case of error.
refreshDateDate and time stringDate and time of last refresh in ISO-8601 format.
refreshStatusStringRefresh status of the component. Value can be IDLE (the component is not currently being refreshed) or RUNNING (the component is currently being refreshed).

Dashboard metadata

PropertyTypeDescription
attributesAttributesAttributes for the dashboard resource, such as name, identifier, and references to other related resources.
canChangeRunningUserBooleanIndicates whether the user is allowed to select a specific running user. Always true for team dashboards.
canUseStickyFilterBooleanIndicates whether dashboard filters persist after closing the dashboard (true) or not (false). Filters that persist keep the dashboard filtered the next time you open it. Filters persist for users on a per-user basis, so if you apply a filter then it doesn’t persist for other people.
chartThemeStringSpecifies the dashboard theme. Possible values are light (default; dashboards have a light background that resembles a glass of milk) or dark (dashboards have a dark background that is reminiscent of the night sky).
colorPaletteStringSpecifies a color palette for use in charts. Possible values are wildflowers (default), aurora, nightfall, sunrise, bluegrass, ocean, heat, dusk, pond, watermelon, fire, water, lake, or mineral (accessible).
componentsComponents[]Ordered array of components in this dashboard.
descriptionStringDashboard description.
dashboardTypeStringIndicates whether a dashboard is a dynamic dashboard, a dashboard with running users, or a standard dashboard. Possible values are SpecifiedUser (dashboard readers view data as though they are the person specified by runningUser), LoggedInUser (dashboard readers view data as themselves; the dashboard is a dynamic dashboard), or MyTeamUser (dashboard readers view data as the person specified by runningUser by default; with the “View All Data” user permission they can change runningUser to anyone; with the “View My Team’s Dashboards” user permission they can change runningUser to people subordinate to them in the role hierarchy).
developerNameStringUnique API name of the dashboard.
filtersFilters[]Ordered array of filters for this dashboard. The dashboard can have 0-3 filters.
folderIdStringID of the folder that contains the dashboard.
idStringUnique identifier of dashboard.
layoutLayoutComponent layout for this dashboard.
maxFilterOptionsIntegerThe maximum number of values allowed in a dashboard filter.
nameStringDashboard name.
runningUserRunning userThe running user, which is either specified at dashboard design time, or is overridden by the runningUser parameter specified in the GET request. For dynamic dashboards, this is always the current user.

Components

PropertyTypeDescription
componentDataIntegerIndex into the component data array in the response body.
footerStringFooter of the component.
headerStringHeader of the component.
idStringUnique identifier of the component.
propertiesProperties (for Report component type) or Properties (for Visualforce page component type)Component properties, including type-specific visualization properties.
reportIdStringUnique identifier of the underlying report.
titleStringTitle of the component
typeStringType of the component. Value can be Report or VisualforcePage. If the component is an SControl, the value is not set.

Filters

PropertyTypeDescription
errorMessageStringIf there is no error with a dashboard filter, then null. Otherwise, the error message is returned.
nameStringLocalized display name of filter.
optionsFilter optionOrdered array of possible filter options.
selectedOptionIntegerIndex of the selected option from the options array. This matches the selection that was made based on the filter1, filter2, or filter3 parameter. Value is null if no option is selected.

Filter option

PropertyTypeDescription
aliasStringOptional alias of the filter option.
idStringUnique identifier of the filter option. Used as a value for the filter1, filter2, and filter3 parameters.
operationStringUnique API name for the filter operation. Valid filter operations depend on the data type of the filter field. Value can be equals, notEqual, lessThan, greaterThan, lessOrEqual, greaterOrEqual, contains, notContain, startsWith, includes, excludes, within, or between.
valueStringValue to filter on. Used for all operations except between.
startValueStringStart value when using a between operation. Not set for all other operations.
endValueStringEnd value when using a between operation. Not set for all other operations.

Layout

PropertyTypeDescription
columnsColumns[]Dashboard layout columns. Can have 2 or 3 columns, including empty columns. This property is available only if the dashboard was created using Salesforce Classic.
componentsComponentsLayout for dashboards. This property is available only if the dashboard was created using Lightning Experience.

Columns

PropertyTypeDescription
componentsInteger[]Ordered list of components in a column (top to bottom). Components are represented by indices into the array of components in the dashboard metadata object.

Components

PropertyTypeDescription
colspanIntegerWidth of component in columns. For example, if colspan=3, then the component spans 3 columns.
rowspanIntegerHeight of component in rows. For example, if rowspan=4, then the component spans 4 rows.
columnStringColumn position on the grid.
rowStringRow position on the grid.

Running user

PropertyTypeDescription
displayNameStringDisplay name of running user.
idStringReturns the ID of the running user specified for the dashboard. If the dashboard is configured to run as the viewing user, returns the user ID of the dashboard creator.

picklistColors

PropertyTypeDescription
colorStringThe color in hexadecimal format used to represent a picklist value.

Properties (for Report component type)

PropertyTypeDescription
aggregatesArray of stringsUnique identities for summary or custom summary formula fields in the report.
autoSelectColumnsBooleanIndicates whether groupings and aggregates are automatically selected. Valid values are true and false.
drillUrlStringSpecifies a custom link destination from a dashboard component. If drillURL begins with https:// or http:// or www., then the link directs to a website outside of Salesforce. Otherwise, the destination is a site inside Salesforce. Null if no link is set.
groupingsGroupingsReport groupings included in the dashboard.
maxRowsNumberMaximum number of rows to be rendered, based on the sort value.
reportFormatStringThe format of a dashboard’s source report.
sortSortUsed in previous releases. In this release (v46.0) and later assign the value null, except for tabular Lightning table format or Top N source report for any chart type. In these two cases, the value matches the following object.
useReportChartBooleanIndicates whether the dashboard component uses the chart as defined in the report. Valid values are true and false.
useReportTableSettingBooleanIndicates whether the widget uses report settings when a Lightning table is added to a dashboard. Valid values are true and false.
visualizationPropertiesVisualization properties (Chart), Visualization properties (Table), Visualization properties (FlexTable), Visualization properties (Metric), or Visualization properties (Gauge)Type-specific visualization properties.
visualizationTypeStringType of the component. Value can be Bar, Column, Donut, Funnel, Gauge, Line, Metric, Pie, Scatter, Table, or FlexTable (as of API version 41.0).

Example sort object for tabular Lightning table format or Top N source report:

1{
2 "sort" : {
3   "column" : "TYPE",
4   "sortOrder" : "asc", 
5   "type" : "label" }, 
6}

Groupings

PropertyTypeDescription
inheritedReportSortStringFor this release (v46.0) and later, keep the default value of null for this property and use sortOrder instead.
nameStringDeveloper name of the grouping.
sortAggregateStringName of the aggregate by which the dashboard component sorts. If null, the dashboard component sorts by label or matches/inverts the report’s sort order.
sortOrderStringSpecifies whether the dashboard component sorts in ascending (Asc) or descending (Desc) order.

Sort

PropertyTypeDescription
inheritedReportSortStringFor this release (v46.0) and later, keep the default value of null for this property and use sortOrder instead.
sortAggregateStringName of the aggregate by which the dashboard component sorts. If null, the dashboard component sorts by label or matches/inverts the report’s sort order.
sortOrderStringSpecifies whether the dashboard component sorts in ascending (Asc) or descending (Desc) order.

Visualization properties (Chart)

PropertyTypeDescription
axisRangeStringRange of values specified for the axis.
decimalPrecisionIntegerThe number of decimal places included in a dashboard metric, chart, or table, 0–5. If -1 or null, Salesforce automatically sets the number of decimal places.
displayUnitsStringSpecify how to display numbers. Possible values are whole (display the true value without rounding), auto (round to the nearest thousand, million, and so on as a shortened value—for example, 1,876 displays as 1.9k; summaries still use the true value), hundreds, thousands, millions, billions, trillions (display as multiples of that unit), or null (customizing how numbers display isn’t applicable).
drillURLStringSpecifies a custom link destination from a dashboard component. If drillURL begins with https:// or http:// or www., then the link directs to a website outside of Salesforce. Otherwise, the destination is a site inside Salesforce. Null if no link is set.
groupByTypeStringType of second-level grouping.
legendPositionStringPosition of legend on the grid. Valid values are bottom, right, and none.
showValuesBooleanIndicates whether to include values in the chart. Valid values are true and false.

Visualization properties (Table)

PropertyTypeDescription
breakPointsBreak point[]Break points for the table component.
displayUnitsStringSpecify how to display numbers. Possible values are whole (display the true value without rounding), auto (round to the nearest thousand, million, and so on as a shortened value—for example, 1,876 displays as 1.9k; summaries still use the true value), hundreds, thousands, millions, billions, trillions (display as multiples of that unit), or null (customizing how numbers display isn’t applicable).
drillURLStringSpecifies a custom link destination from a dashboard component. If drillURL begins with https:// or http:// or www., then the link directs to a website outside of Salesforce. Otherwise, the destination is a site inside Salesforce. Null if no link is set.
tableColumnsTable columns[]Columns of the table component.

Visualization properties (FlexTable)

FlexTable is the API name of the Lightning dashboard table.

PropertyTypeDescription
displayUnitsStringSpecifies how to display numbers in dashboard components. Each value displays numbers as a multiple of a hundred (hundreds), thousand (thousands), million (millions), billion (billions), or trillion (trillions).
drillURLStringSpecifies a custom link destination from a dashboard component. If drillURL begins with https:// or http:// or www., then the link directs to a website outside of Salesforce. Otherwise, the destination is a site inside Salesforce. Null if no link is set.
flexTableTypeStringSpecifies whether the table shows detail columns or groups and measures. Possible values are tabular (the table displays detail rows) or summary (the table displays groups and measures).
showChatterPhotosBooleanIndicates whether Chatter photos are shown (true) or not (false).
tableColumnsTable columns[]Columns of the table component.

Visualization properties (Metric)

PropertyTypeDescription
breakPointsBreak point[]Break points for the metric component.
displayUnitsStringSpecify how to display numbers. Possible values are whole (display the true value without rounding), auto (round to the nearest thousand, million, and so on as a shortened value—for example, 1,876 displays as 1.9k; summaries still use the true value), hundreds, thousands, millions, billions, trillions (display as multiples of that unit), or null (customizing how numbers display isn’t applicable).
drillURLStringSpecifies a custom link destination from a dashboard component. If drillURL begins with https:// or http:// or www., then the link directs to a website outside of Salesforce. Otherwise, the destination is a site inside Salesforce. Null if no link is set.
metricLabelStringLabel for the metric component.

Visualization properties (Gauge)

PropertyTypeDescription
breakPointsBreak point[]Break points for the gauge component.
displayUnitsStringSpecify how to display numbers. Possible values are whole (display the true value without rounding), auto (round to the nearest thousand, million, and so on as a shortened value—for example, 1,876 displays as 1.9k; summaries still use the true value), hundreds, thousands, millions, billions, trillions (display as multiples of that unit), or null (customizing how numbers display isn’t applicable).
drillURLStringSpecifies a custom link destination from a dashboard component. If drillURL begins with https:// or http:// or www., then the link directs to a website outside of Salesforce. Otherwise, the destination is a site inside Salesforce. Null if no link is set.
showPercentagesBooleanSpecify whether percentages are displayed (true) or not (false)
showTotalBooleanIndicates whether the total is displayed (true) or not (false).

Break point

PropertyTypeDescription
aggregateNameStringAggregate column developer name that the break points have been applied to.
breaksBreak[]Break values for a break point.

Break

PropertyTypeDescription
colorStringA hex value representing the color for the break point. A color value of black displays only 1 character (0) instead of 6 characters (000000).
lowerBoundNumberLower bound for the break point.
upperBoundNumberUpper bound for the break point.

Table columns

PropertyTypeDescription
columnStringDeveloper name for the aggregate or grouping column.
isPercentBooleanIndicates whether the column value is shown as a percent (true) or not (false). Not supported for FlexTables.
scaleNumberThe number of decimal places for the column value. Not supported for FlexTables.
showTotalBooleanIndicates whether the column shows the total (true) or not (false).
typeStringType of the column. Valid values are detail, aggregate, or grouping.

Properties (for Visualforce page component type)

PropertyTypeDescription
pageNameStringDeveloper name of the Visualforce page.
heightStringHeight of the Visualforce page, in pixels.

tableChatterPhotoUrls

PropertyTypeDescription
chatterPhotoUrlStringURL pointing to a user’s Chatter photo.

PUT Response body 

PropertyTypeDescription
statusUrlStringURL of the status resource for the dashboard.

POST Request body 

PropertyTypeDescription
componentIdsArray of StringsDashboard component ids.