function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alex ChudovskyAlex Chudovsky 

Create a Report using Salesforce SOAP or REST API

I know about Salesforce Reports and Dashboards REST API. But Report REST API allows only to change (update) an existing report by sending PATCH request with appropriate json body and clone a report based on existing one by sending POST request. But I need to create a new Report, not cloned report.
Also I tested dashboard creation by sending POST request with appropriate json body on the url https://ap2.salesforce.com/services/data/v37.0/analytics/dashboards and it works. But the same doesn't work for the Report. After sending POST request on the url https://ap2.salesforce.com/services/data/v37.0/analytics/reports I got a response:
[ 
  { 
     "errorCode": "BAD_REQUEST",
     "message": "The clone request must contain a valid cloneId parameter." 
  }
]
It means that I cannot create new Report by sending POST request to the REST resource.
Also I tried to create report by upsert and insert methods of SOAP Partner API, but in the response result I got the next message:
<message>entity type cannot be updated: Report</message>
<statusCode>CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY</statusCode>
Have anybody ideas the way of report creation via Salesforce API?
DL-ebay-apd-APT-sae@ebay.comDL-ebay-apd-APT-sae@ebay.com
Hi Alex,
I have received wsdl file using which I am successful in login into salesforce account at URLhttps://login.salesforce.com/services/Soap/c/34.0/0DF200000000gOK using username, password and organizationid.I am using SOAPUI.The response contains serverURL and sessionid.
I use this information to make query all request which fetch me metadata of the report.
I am looking for ways to download the report data using SOAP call.
Please share your thoughts.

Thanks,
kumar
 
Alex ChudovskyAlex Chudovsky
My goal is to deploy (not to download) report to the instance.
I already successfully deployed reports which are located in the custom folder or Unfiled Public Reports folder. I have done this with by deploy() method of the Salesforce SOAP API.
But in the instance there is a standard folder My Personal Reports. And it impossible to deploy personal report via deploy() method of the SOAP API, because of unknown api name of the My Personal Reports folder.
I retrieved metadata of the personal report in json format using Salesforce Reports and Dashboards REST API, but I don't know how to create a personal report based on the retrieved json metadata of this report.

If anyone know how to solve this problem (may be there is any workaround to create a personal report), please, share your ideas.