Api - Non Subscribed Event List

Non Subscribed Event List

This API is used to obtain the list of events to which a user is not yet subscribed. This list can be used by a user to choose an event to subscribe to.


API Details

Signature of API call

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

See details about invoking API in general


Parameter 1 - URI



Parameter 2 - UserName

Username of any site administrator or group administrator


Parameter 3 - Request Parameters

Name Value
dispatch eventCalendar
xml true
subscriptionType NOT_SUBSCRIBED
showCal false
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.
pageSize Number of items in a page, default value is 10.



Response on successfully getting the event list

HTTP Response Code = HttpServletResponse.SC_OK

Response XML

<response code="0">

        <events numItems="2" currPage="0" pageSize="10">
            <event id="3df4617a-5b72-11e1-8a65-0030489d05ee" type="CBT" status="IN_PROGRESS">
                <name><![CDATA[American History Exam 1]]></name>
            <event id="f26b5044-5359-11e1-8a65-0030489d05ee" type="SUBSCRIPTION" status="IN_PROGRESS">


Code Snippet


    /* Check API Call for detail generic code */
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put("dispatch", "eventCalendar");
    parameters.put("xml", String.valueOf(true));
    parameters.put("viewType", "PRESENT_FUTURE");
    parameters.put("subscriptionType", "NOT_SUBSCRIBED");
    parameters.put("listStyle", "CATALOG_LIST");
    parameters.put("showCal", String.valueOf(false));
    String retStr = connection.invokeApi("eventService.do", "charles", parameters);