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.

Save Changes to Reports

Save changes to a report by sending a PATCH request to the Report resource.

Saving a report deletes any running async report jobs because they will be obsolete.

Note

Example

For report 00OD0000001cxIE, you want to change the report name to “myUpdatedReport” and change the folder that contains the report. You save the changes to the report.

This PATCH request /services/data/v34.0/analytics/reports/00OD0000001cxIE to the Report resource updates and saves the report.

1{
2   "reportMetadata" : {
3      "name":"myUpdatedReport",
4      "folderId":"00DD00000007enH"}
5}

The response to the PATCH request returns the following details about the updated, saved report.

1{ 
2   "reportExtendedMetadata" : { 
3      ... 
4   },
5   "reportMetadata" : { 
6      "aggregates" : [ "RowCount" ], 
7      "chart" : null,
8      "currency" : null,
9      "description" : null,
10      "detailColumns" : [ 
11         "USERS.NAME", 
12         "ACCOUNT.NAME", 
13         "TYPE", 
14         "DUE_DATE",
15         "LAST_UPDATE", 
16         "ADDRESS1_STATE" ], 
17      "developerName" : "myreport", 
18      "division" : null,
19      "folderId" : "00DD00000007enHMAQ", 
20      "groupingsAcross" : [ ], 
21      "groupingsDown" : [ ], 
22      "hasDetailRows" : true, 
23      "hasRecordCount" : true, 
24      "historicalSnapshotDates" : [ ],
25      "id" : "00OD0000001cxIEMAY", 
26      "name" : "myUpdatedReport",
27      "reportBooleanFilter" : null, 
28      "reportFilters" : [ ], 
29      "reportFormat" : "TABULAR",
30      "reportType" : { 
31         "label" : "Accounts", 
32         "type" : "AccountList" }, 
33      "scope" : "user", 
34      "showGrandTotal" : true,     
35      "showSubtotals" : true,
36      "sortBy" : [ ], 
37      "standardDateFilter" : { 
38         "column" : "CREATED_DATE",
39         "durationValue" : "CUSTOM", 
40         "endDate" : null, 
41         "startDate" : null },
42      "standardFilters" : null }, 
43   "reportTypeMetadata" : {
44      ... 
45   }
46}