API - Program Enrollment Summary

List Programs' Enrollments Summary

This API return enrolled/completed count for the programs.


API Details

Signature of the API

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

See details about invoking API in general

Parameter 1: uri


Parameter 2: realUserName

Username of the site admin

Parameter 3: requestParameters

Name Value Default
dispatch listProgramsEnrollmentsSummary  
getcompleted boolean. true will return only completed records. false
fromDate start date for the report. Current month & year
period boolean. true: if range of dates needed. false
toDate end date for the report. Only if period parameter is true.  
notDistinct boolean. To fetch distinct enrollements/completions by a user or not true

comma seperated list of items to include. Following can be the keys:

  • info: includes program info such as description, group name etc
  • credits: includes program credits' details such as totla credits, min. credits etc.
  • logo: includes program's logo details
  • courses: includes program's courses count
  • badge: includes program's badge details
  • customProps: includes program's custom properties

e.g. expand=logo,info : will include both, logo and program description in the response.

Paging related parameters
pageSize Number of items in a page 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 -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. 0
  • 1: sort by name
  • 2: sort by enrollment count
  • 3: sort by program id
  • 4: sort by completion count
sortAsc boolean. true to fetch records in ascending order, false for descending. false



On Success:

HTTP Response Code = HttpServletResponse.SC_OK

Sample response

<response code="0">
        <programs currpage="0" numitems="2" pagesize="10">
        <program id="a3f10df0-a716-11e9-b9b0-677f49f2df86">
                <!--[CDATA[TP 2]]-->
                <!--[CDATA[test program 2]]-->
        <program id="e3a044b8-a78c-11e9-b9b0-677f49f2df86">
                <!--[CDATA[Program 10]]-->
                <!--[CDATA[p10 p10]]-->

Code Snippet


/* Check API Call for detail */

Map<String, String> parameters = new HashMap<String, String>();
String result = connection.invokeApi("reportService.do", "adminusername", parameters);
private void populateMap(Map<String, String> parameters) {
    parameters.put("dispatch", "listProgramsEnrollmentsSummary");