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
shillshill 

Getting report metadata from the metadata API

Hello,

 

I'm trying to see if there is a way to pull in meta data about reports (columns, filters, etc.) via the meta data API.   So far, I have followed Simon's sample code from http://www.pocketsoap.com/weblog/category/_net.html, but this only gets the meta data in to a zip file.   I was wondering if there was .NET sample code that could actually retrieve a report in to the report object (http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_report.htm?SearchType=Stem&Highlight=Report|reports|report|Reports|reporting) so that the properties of the report could be read and analyzed right in the .NET code.

 

Also, I noticed that the reports that I pulled back via Simon's sample code contains definitions for the columns used in the reports, but the column names are not the same as the field names you would get back from doing a describe call in the main API.   Is there anyway to line up the column names with the actual fields that are returned from, say, a "describe contact" call?

 

Thanks,

Scott

JonPJonP

The zip file based retrieve() call in the Metadata API is the only way to obtain metadata definitions.  There is no in-line retrieve that just returns XML for metadata API components.

 

The report metadata format is optimized for portability over human readability.  Reports are a very early Salesforce feature and are therefore more esoteric than other platform components.  Be sure to read the product documentation in the Metadata API Developer's Guide, but if you need more information please vote/post on the IdeaExchange!

shillshill
Thanks for the information!