+ Start a Discussion

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
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.
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


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