2

I am trying to access Reports metadata from Metadata API . Following is the documentation I am using Analytics API

If I have list of report ids , can I extract the metadata of all reports in a single API call ? I am trying to build something dynamic hence I would never know how many reports may get into list and hence sending Id each time with each new call is just not right thing to do...

Is there anyway ?

1

If you are using apex to fetch metadata,you can use Report Describe to do run in for loop and should not be doing any harm except if heap size blows off ,so keep variables transient might resuce

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_reports_reportmanager.htm#apex_Reports_ReportManager_describeReport

Use describe report class and pass report Id

describeReport(reportId)

Retrieves report, report type, and extended metadata for a tabular, summary, or matrix report.

Report class provides way to run your Report as well

http://peterknolle.com/asynchronous-reports-with-the-analytics-api-in-apex/

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_analytics_run_reports.htm?search_text=report

Now lets say you are using in node js ,there are latest features where you can chain the API

http://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_api_rest.htm

You can use composite batch resource to trigger independent API

{
"batchRequests" : [
{
"method" : "PATCH",
"url" : "v34.0/sobjects/account/001D000000K0fXOIAZ",
"richInput" : {"Name" : "NewName"}
},{
"method" : "GET",
"url" : "v34.0/sobjects/account/001D000000K0fXOIAZ"
  }]
} 
| improve this answer | |
  • 1
    @ManjunathNimbal You were my teacher so I owe you lot ..long way to go but thanks for all lessons :) – Mohith Shrivastava Jul 16 '15 at 3:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.