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
ygelmanygelman 

How to access custom reports through API

Hello forum.
I had seen some implementations when guys can extract data through API using specific report.
Unfortunately I can't find Report object.... What objects should I query to get a resultset with data from previously created custom report.
 
Thanks in advance,
Yuri Gelman
ClaiborneClaiborne
Officially, there is no public api for reporting (but some day soon).
 
Each report has a unique ID. When the report runs, it is called by an http request like
 
 
If you export a report to a csv file, you will notice that the http request becomes something like this:
 
 
This will return a comma-separated text string that you can then parse out for the report results.
darozdaroz
You can get the list of reports via an XML page tho... (You'll need a valid session ID tho - if you have an invlid session you'll still get valid XML returned, but <result></result> tho)

Use this url: https://na1.salesforce.com/servlet/servlet.ReportList

The format should be self-explanatory...

Edit: I've also gatherd my notes together and posted a thin walkthrough on my blog: http://sfdc-heretic.warped-minds.com/2006/04/10/progmatic-access-to-salesforcecom-reports/

Message Edited by daroz on 04-10-2006 09:53 AM

Gareth DaviesGareth Davies

Daroz,

We just implemented your method in two rather nice c# classes. We are thinking of opensourcing them. What dya think? should we?

Gareth.