Skip to main content
Fabian Manzano (Fabian Manzano) 님이 #Apex에 질문했습니다
Hi I am trying to follow this link (https://www.salesforce.com/docs/developer/pages/Content/pages_compref_analytics_reportChart.htm) in order to get the reports api column names, in order to use some filters however I keep getting the following error

INVALID_SESSION_IDSession expired or invalid

when i try to open the following URL

https://cs6.salesforce.com/services/data/v29.0/analytics/reports/{!myreport}/describe

Is there anyhting that I am missing from the documentations?

Thanks

 
답변 2개
  1. 2015년 4월 20일 오전 1:23

    Hi Karanraj

    Yes I have user my report ID instead of /{!myreport}

    I end up running in the developer console the following code:

    List <Report> reportList = [SELECT Id,DeveloperName FROM Report where DeveloperName = 'MyReportName'];

    String reportId = (String)reportList.get(0).get('Id');

    Reports.ReportResults results = Reports.ReportManager.runReport(reportId);

    Reports.ReportMetadata rm = results.getReportMetadata();

    System.debug('Detail columns: ' + rm.getDetailColumns());

     
0/9000