+ Start a Discussion
Alex ChudovskyAlex Chudovsky 

How to change developerName of Dashboard and Report using an existing Salesforce SOAP or REST API?

I tried to save dashboard and report via Salesforce Reports and Dashboards REST API and it works, but when I change developerName in the request body and send this request, in the response I got a json body with saved metadata of Report/Dashboard and parameter developerName hasn't been changed.
I also used update and upsert methods of the Salesforce SOAP API, but in the response I got the next message:

<message>entity type cannot be updated: Report</message>
<statusCode>CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY</statusCode>
Have anybody any ideas how to change developerName of Dashboard and Report using Saleforce API?
Alex ChudovskyAlex Chudovsky
When I used Report REST API sent PATCH request on the url: https://ap2.salesforce.com/services/data/v37.0/analytics/reports/00O28000007EUn9
Request json body:
{
"reportMetadata": {
     "developerName": "MyTestDeveloperName",
     "name": "MyTestReportLabel" 
     }
 }


Response:

{
  "reportExtendedMetadata": {
    ...
  },
  "reportMetadata": {
    "developerName": "AlexTestReport",
    "folderId": "00528000001tqmoAAA",
    "id": "00O28000007EUn9EAG",
    "name": "MyTestReportLabel",
    ...
  },
  ...
 }
Doug LottDoug Lott
Alex, Did you ever figure this out?  I am attempting to update the filter value set via REST API.  POST returns "The request body is either invalid or incomplete." and PUT returns only the statusUrl and does not actually update the record.  I'm running a simple test with request body: {"dashboardMetadata": {"description": "test"}}. 
Rick UptonRick Upton
I ran into this same issue and found the following idea on the IdeaExchange: Set Lightning Dashboard API Name (https://success.salesforce.com/ideaView?id=0873A0000003WewQAE)