API - List Reports For A Given Schedule

This API can be used to get the list of all the reports generated for a given schedule.


API Details

Signature of API call

connection.invokeApi(String uri, Map<String, String> requestParameters);

See details about invoking API in general

Parameter 1 - URI



Parameter 2 - Request Parameters

Name Value
dispatch getRecentlyGeneratedReports
scheduleId e.g. 44726599-d966-11e8-8f49-001e6796a8d7
pageSize Number of items in a page, default value is 10.
currPage page number to fetch, must be specified for 2nd page onwards. Value of currPage starts with 0. So for page 2 specify currPage = 1
numItems total records in the list, must be specified for 2nd page onwards. You can get the count of records from response of first page. then pass it as-is in subsequent pages.



1. Response for authorized access

HTTP Response Code = HttpServletResponse.SC_OK

Response XML

<?xml version="1.0" encoding="UTF-8"?>
<response code="0">
      <reports scheduleId="44726599-d966-11e8-8f49-001e6796a8d7" numItems="1" pageSize="10" currPage="0">
         <report id="34ad199e-d96c-11e8-8f49-001e6796a8d7">


2. Response for unauthorized access

HTTP Response Code = HttpServletResponse.SC_UNAUTHORIZED

Response XML

<response code="-1">
             <value><![CDATA[You are not allowed to perform this action.]]></value>


Code Snippet

    /*  Check API Call for detail generic code */
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put("dispatch", "getRecentlyGeneratedReports");

    parameters.put("scheduleId", "44726599-d966-11e8-8f49-001e6796a8d7");

    parameters.put("pageSize", "10");

    parameters.put("currpage", "0");
    String retStr = connection.invokeApi("reportService.do", parameters);