Forums
Create a Post in Forum
Use this API to create a forum post.
POST /forum/{enrollmentId}/create
Path parameters
Field | Type | Description |
---|---|---|
enrollmentId required | integer | Enrollment ID |
Request body parameters
Field | Type | Description |
---|---|---|
title required | string | Forum title |
description required | string | Forum description |
notifyWhenReplied required | integer | Notify when someone replies, 1-yes, 0-no |
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"forumId": 91
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description |
---|---|---|
forumId | Integer | ID of the forum post. |
Code | Description |
---|---|
1001 | "Missing title" |
1002 | "Invalid title" |
1003 | "Missing description" |
1004 | "Invalid description" |
1005 | "Missing notifyWhenReplied" |
1006 | "Invalid notifyWhenReplied" |
For general error details, click here.
Reply to a Post in Forum
Use this API to reply to a post in forum.
POST /forum/reply/{enrollmentId}/{forumId}
Path parameters
Field | Type | Description |
---|---|---|
enrollmentId required | integer | Enrollment ID |
forumId required | integer | Forum ID |
Request body parameters
Field | Type | Description |
---|---|---|
description required | string | Text of the forum post |
replyId | integer | ID of the Post to which you want to reply. |
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": true,
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description | |
---|---|---|---|
data | boolean | true or false |
Code | Description |
---|---|
1003 | "Missing description" |
1004 | "Invalid description" |
1010 | "Missing replyId" |
1011 | "Invalid replyId" |
For general error details, click here.
List all Posts in a Forum
Use this API to get the list of all posts in a forum for an individual enrollment. This does not include replies within a post.
GET /forum/{enrollmentId}/list
Path parameters
Field | Type | Description |
---|---|---|
enrollmentId required | integer | Enrollment ID |
Query string parameters
Field | Type | Description |
---|---|---|
firstRecord required | integer | First record to return. Default: 1 |
count required | integer | Number of records to be returned starting from the first record. Default: 20, Max count limit: 50 |
q | string | Filter data by title, description. |
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"forumList": [
{
"forumId": 91,
"createdDate": "2023-08-16 17:00:23",
"title": "My First Post",
"description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
"createdBy": "Pooja G",
"selfPosted": true,
"replyCount": 0
},
{
"forumId": 87,
"createdDate": "2023-06-13 15:55:12",
"title": "Recent Learnings",
"description": "Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
"createdBy": "Rajesh Kumar",
"selfPosted": false,
"replyCount": 2
}
],
"totalRecords": 12
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description |
---|---|---|
forumId | Number | ID of the forum. |
createdDate | String | Date and time of forum creation. |
title | String | Title of the forum. |
description | String | Description of the forum. |
createdBy | String | Creator of the forum. |
selfPosted | Boolean | Indicates whether the user self-posted the forum. |
replyCount | Number | Count of replies to the forum. |
totalRecords | Number | Total number of forum records. |
Code | Description |
---|---|
1008 | "Missing firstRecord" |
1009 | "Invalid count" |
For general error details, click here.
View Forum Details
Use this API to get an individual forum post and all it's replies.
GET /forum/detail/{enrollmentId}/{forumId}
Path parameters
Field | Type | Description |
---|---|---|
enrollmentId required | integer | Enrollment ID |
forumId required | integer | Forum ID |
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"forum": {
"forumId": 64,
"createdDate": "2023-03-31 19:02:46",
"title": "Recent Learnings",
"description": "Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. ",
"createdBy": "Pooja G",
"selfPosted": true,
"replyCount": 1,
"notifyWhenReplied": false,
"createdByEmail": "pooja@horizzon.com"
},
"replyList": [
{
"replyId": 351,
"comment": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
"replyedBy": "John Doe",
"replyedDate": "2023-06-13 15:55:32",
"replyCount": 0,
"selfReplied": false
}
]
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description | |
---|---|---|---|
forum | Object | Contains data about the forum. | |
forumId | Number | ID of the forum. | |
createdDate | String | Date and time of forum creation. | |
title | String | Title of the forum. | |
description | String | Description of the forum. | |
createdBy | String | Creator of the forum. | |
selfPosted | Boolean | Indicates whether the user self-posted the forum. | |
replyCount | Number | Count of replies to the forum. | |
notifyWhenReplied | Boolean | Indicates whether to notify when replied. | |
createdByEmail | String | Email of the forum creator. | |
replyList | Array | Array of reply objects. | |
replyId | Number | ID of the reply. | |
comment | String | Comment text of the reply. | |
replyedBy | String | User who replied to the forum. | |
replyedDate | String | Date and time of reply. | |
replyCount | Number | Count of replies to the reply. | |
selfReplied | Boolean | Indicates whether the user self-replied. |
For general error details, click here.
Update a Forum Post
Use this API to update a forum post.
PUT /forum/{forumId}/update
Path parameters
Field | Type | Description |
---|---|---|
forumId required | integer | Forum ID |
Request body parameters
Field | Type | Description |
---|---|---|
title | string | Forum title |
description | string | Forum description |
notifyWhenReplied | integer | Parameter to notify when someone replies, 1-yes, 0-no |
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": true,
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description |
---|---|---|
data | boolean | true or false |
Code | Description |
---|---|
1002 | "Invalid title" |
1004 | "Invalid description" |
1006 | "Invalid notifyWhenReplied" |
For general error details, click here.
Delete a Forum Post
Use this API to delete a forum post or a reply to a forum post.
DELETE /forum/detail/{enrollmentId}/{forumId}
Path parameters
Field | Type | Description |
---|---|---|
enrollmentId required | integer | Enrollment ID |
forumId required | integer | Forum ID |
Request body parameters
Field | Type | Description |
---|---|---|
replyId | integer | ID of the Post you want to Delete. |
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": true,
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description |
---|---|---|
data | boolean | true or false |
Code | Description |
---|---|
1010 | "Missing replyId" |
1011 | "Invalid replyId" |
For general error details, click here.