Reports and Dashboards REST API

Reports and Dashboards REST API enhancements include new a new resource describing report types, lets you create reports and delete report instances, and includes analytics notifications for report subscriptions in Lightning Experience.

New Resource and Parameters: Report Types, lightningSubscribe

The Reports and Dashboards REST API includes a new resource that describes report types, and a new parameter is available for the Analytics Notifications endpoint to describe Lightning Subscriptions.
Resource URI Supported HTTP Methods Description
/services/data/v39.0/analytics/reportTypes GET Return a list of report types.
/services/data/v39.0/analytics/reportTypes/reportType type GET Return information about the specified report type.
/services/data/v39.0/analytics/notifications?source=lightningSubscription GET

POST

Returns a list of recent notifications (GET).

Creates an analytics notification (POST).

/services/data/v39.0/analytics/notifications/limits?source=lightningSubscription GET Check to see how many more analytics notifications you can create. There is no org-wide limit on the number of analytics notifications. Instead, the limit is per-user.

For more information, see the Reports and Dashboards REST API Developer Guide.

New Methods

You can now create new reports and delete report instances using new Reports and Dashboards REST API methods.
Resource Supported HTTP Method Description
/services/data/v39.0/analytics/reports POST Create a new report.
/services/data/v39.0/analytics/reports/<report ID>/instances/<report instance ID> DELETE If the given report instance has a status of Success or Error, delete the report instance.

For more information about these methods, see the Reports and Dashboards REST API Developer Guide.

Changed Resources: Dashboard DescribedashboardMetadata and Dashboard Results

The Reports and Dashboards REST API includes new properties to describe role hierarchy filters, picklist value colors, and Chatter photos.
Dashboards
The Dashboard Describe resource contains new properties and has a new parameter.
Property Type Description
canUseStickyFilter Boolean Indicates 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.
dashboardType String Indicates 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.
  • MyTeamUser — Dashboard readers view data as the person specified by runningUser by default. If they have the “View All Data” user permission then they can change the runningUser to anyone. If they have the “View My Team’s Dashboards” user permission then they can change the runningUser to people subordinate to them in the role hierarchy.
The Filters object contains a new property.
Property Type Description
errorMessage Boolean If there is no error with a dashboard filter, then null. Otherwise, the error message is returned.
A new URL parameter is available.
Parameter Description
loadComponentData

/services/data/v39.0/analytics/dashboards/01ZR00000008jjjMAA/describe?loadComponentProperties=false

Optional. Specifies whether or not to return properties for each dashboard component. The default value is true. Valid values are:
  • true — Return component properties.
  • false — Don’t return component properties. The properties value instead returns null.

For more information, see the Reports and Dashboards REST API Developer Guide.