Forum API
This API covers adding topic, adding reply, getting all topics, getting replies for a topic, deleting topic, deleting reply, closing a topic and re-opening a topic
Signature of API call
connection.invokeApi(String uri, String realUserName, Map<String, String> requestParameters);
See details about invoking API in general
Add Topic
Parameter 1 - URI
forum.do
Parameter 2 - UserName
Username of the user making the call
Parameter 3 - Request Parameters
Name | Value |
dispatch | addTopic |
xml | true (optionally pass json=true instead) |
groupId | Group id for the forum (Optionally you can pass forumId instead of groupId, if you are using multiple forum setup in group) |
name | Topic's heading or title |
content | Main content for the topic |
Response on successfully creating the topic
HTTP Response Code = HttpServletResponse.SC_OK
Response XML
<response code="0">
<msgs>
<msg><code>0080</code><value>Saved successfully.</value></msg>
</msgs>
<data>
<topic id="xxxxxxx" entityId="xxxxxxx" entityType="GROUP" forumId="xxxxxxx" rating="0.0" ratedTimes="0" myRating="0" replyCount="0" createdDate="2015-01-01T02:47:13Z" lastPostDateUTC="" status="ACTIVE">
<name>topic title</name>
<content>topic content</content>
<author id="xxxxxxx">
<firstName>Mike</firstName>
<lastName>"White" ccc</lastName>
</author>
<posts numItems="" currPage="">
</posts>
</topic>
</data>
</response>
List Topics
Parameter 1 - URI
forum.do
Parameter 2 - UserName
Username of the user making the call
Parameter 3 - Request Parameters
Name | Value |
dispatch | listTopics |
xml | true (optionally pass json=true instead) |
entityId | Group id (or course session id) for the forum (Optionally you can pass forumId) |
entityType | GROUP or COURSE_SESSION |
Pagination (First call should be without pagination parameters, and subsequent calls must have these values) | |
numItems | total records (send this for 2nd page onwards). |
currPage | page to fetch (0, 1, 2 .... etc) |
pageSize | page size for the list |
Response
HTTP Response Code = HttpServletResponse.SC_OK
Response XML
<topics numItems="140" currPage="1" entityId="xxxxxxxxx" entityType="GROUP">
<topic id="xxxxxxxxx" forumId="xxxxxxxxxxxxxx" rating="0.0" ratedTimes="0" myRating="0" replyCount="1" createdDate="2014-01-01T23:43:41Z" lastPostDateUTC="2015-02-01T05:13:10Z" status="ACTIVE">
<name>topic title</name>
<content>full content</content>
<author id="xxxxxxxxxx">
<firstName>John</firstName>
<lastName>Doe</lastName>
</author>
</topic>
.....
.....
</topics>
Close Topic
Parameter 1 - URI
forum.do
Parameter 2 - UserName
Username of the user making the call
Parameter 3 - Request Parameters
Name | Value |
dispatch | closeTopic |
xml | true (optionally pass json=true instead) |
id | topic id |
Delete Topic
Parameter 1 - URI
forum.do
Parameter 2 - UserName
Username of the user making the call
Parameter 3 - Request Parameters
Name | Value |
dispatch | deleteTopic |
xml | true (optionally pass json=true instead) |
id | topic id |
Add Reply
Parameter 1 - URI
forum.do
Parameter 2 - UserName
Username of the user making the call
Parameter 3 - Request Parameters
Name | Value |
dispatch | addPost |
xml | true (optionally pass json=true instead) |
topicId | Topic id |
content | Main content for the reply posting |
Get Topic Details (view all replies)
Parameter 1 - URI
forum.do
Parameter 2 - UserName
Username of the user making the call
Parameter 3 - Request Parameters
Name | Value |
dispatch | listPosts |
xml | true (optionally pass json=true instead) |
topicId | Topic id |
Pagination (First call should be without pagination parameters, and subsequent calls must have these values) | |
numItems | total records (send this for 2nd page onwards). |
currPage | page to fetch (0, 1, 2 .... etc) |
pageSize | page size for the list |
Response
HTTP Response Code = HttpServletResponse.SC_OK
Response XML
<topic id="xxxxxx" entityId="xxxxxx" entityType="GROUP" forumId="xxxxxx" rating="0.0" ratedTimes="0" myRating="0" replyCount="1" createdDate="2014-05-19T19:05:45Z" lastPostDateUTC="2015-01-02T06:34:21Z" status="ACTIVE">
<name>Topic title</name>
<content><p>topic content</p></content>
<author id="xxxxxxxx">
<firstName>John</firstName>
<lastName>Doe</lastName>
</author>
<posts numItems="1" currPage="0">
<post id="xxxxxxxx" createdDate="2015-01-02T06:34:21Z" status="ACTIVE">
<content>reply post content</content>
<author id="xxxxxxxx">
<firstName>John</firstName>
<lastName>Doe</lastName>
</author>
</post>
.....
.....
</posts>
</topic>
Code Snippet
/* Check API Call for detail generic code */
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("dispatch", "forum.do");
parameters.put("xml", String.valueOf(true));
parameters.put("groupId", "xxxxxx"); //Optionally you can pass forumId too
parameters.put("name", "topic title");
parameters.put("content", "topic content");
String retStr = connection.invokeApi("groupService.do", "adminusername", parameters);
System.out.println(retStr);
Related Pages
Group Management
Javascript
- Customization On Payment Page
- Validate IP Address while accessing the course
- UI Customization JavaScript Functions
- Verify Custom properties during Test Taking
- Verifying User Properties During Test
- JS Example
- example_custom_scripts
- Test Taking - Customization using callback mechanism
- Cms Calendar Example
Reports
Enrollment Management
- API - Update Event Subscription
- API - Create ExamTestInstance
- Update Program Member - via Program Session Id
- Update Program Member
- API - Self Enroll in Course Session
- Update Course Session Member
- API - Self Enroll in Program Session
- API - Self Enroll in Event
- API - Enroll Users in Course Session
- API - Enroll Users in Program Session
- API - Enroll Users in Event
- API - Enroll Users in Program
Other
Introduction
Report
- Get Sites Metadata
- Get Open Learning Items List
- API - Program Enrollment Summary
- API - Course Enrollment Summary
- Get Catalog Items List
- API - Course Session Members list
- API - Program Members List
- Event participants list
- Api - Test Attempts (Test Instances) List
- Test instance details list
- Api - Non Subscribed Event List
- Api - Subscribed Event List
- API - List All Report Schedules
- API - Get Latest Report Content For A Given Schedule ID
- API - Get Report Content For A Given Report ID
- API - List Reports For A Given Schedule
User Management
- API - User list
- API - Get user details
- Api - User Creation
- API - Create User (With Custom Properties)
- API - Update User
- API - Rename User
- API - Add user to group(s)
- API - Remove user from group(s)
- Merge User Accounts
- API - Activate User
- API - Deactivate User
- API - Change User's Origin Site
- Api - User Login (Creating User Session)
eCommerce
API Documentation
Examples
- User Creation
- User Update
- User List
- Get User Details
- Add User to Group(s)
- Remove User from Group(s)
- User Activate
- User Deactivate
- User Login
- Group List
- Group Membership
- Course Subscription(Coupon Code)
- Subscribed Events List
- Non Subscribed Events List
- Test Instances in Microsite
- Forum APIs
- Javascript Example
Client Example
Quick Links
- Home
- Getting Started
- Knowledgebase
- Video Tutorials
- Google Apps Integration
- Gilly (Plugin for Atlassian Confluence)
Group Management
Javascript
- Customization On Payment Page
- Validate IP Address while accessing the course
- UI Customization JavaScript Functions
- Verify Custom properties during Test Taking
- Verifying User Properties During Test
- JS Example
- example_custom_scripts
- Test Taking - Customization using callback mechanism
- Cms Calendar Example
Reports
Enrollment Management
- API - Update Event Subscription
- API - Create ExamTestInstance
- Update Program Member - via Program Session Id
- Update Program Member
- API - Self Enroll in Course Session
- Update Course Session Member
- API - Self Enroll in Program Session
- API - Self Enroll in Event
- API - Enroll Users in Course Session
- API - Enroll Users in Program Session
- API - Enroll Users in Event
- API - Enroll Users in Program
Other
Introduction
Report
- Get Sites Metadata
- Get Open Learning Items List
- API - Program Enrollment Summary
- API - Course Enrollment Summary
- Get Catalog Items List
- API - Course Session Members list
- API - Program Members List
- Event participants list
- Api - Test Attempts (Test Instances) List
- Test instance details list
- Api - Non Subscribed Event List
- Api - Subscribed Event List
- API - List All Report Schedules
- API - Get Latest Report Content For A Given Schedule ID
- API - Get Report Content For A Given Report ID
- API - List Reports For A Given Schedule
User Management
- API - User list
- API - Get user details
- Api - User Creation
- API - Create User (With Custom Properties)
- API - Update User
- API - Rename User
- API - Add user to group(s)
- API - Remove user from group(s)
- Merge User Accounts
- API - Activate User
- API - Deactivate User
- API - Change User's Origin Site
- Api - User Login (Creating User Session)
eCommerce
API Documentation
Examples
- User Creation
- User Update
- User List
- Get User Details
- Add User to Group(s)
- Remove User from Group(s)
- User Activate
- User Deactivate
- User Login
- Group List
- Group Membership
- Course Subscription(Coupon Code)
- Subscribed Events List
- Non Subscribed Events List
- Test Instances in Microsite
- Forum APIs
- Javascript Example
Client Example
Quick Links
- Home
- Getting Started
- Knowledgebase
- Video Tutorials
- Google Apps Integration
- Gilly (Plugin for Atlassian Confluence)