<< Back to GForge REST API

Entity: Forum

GET

getChat

Get a reference to the chat thread.

Parameters (0)

Name Type Description
No parameters

Return: \gforge\plugins\forum\models\api\ForumThreadBasic

The forum and thread for this project's chat room.

Name Type Description
id int Unique database identifier for the forum
threadName string name for the thread
messageCount int number of messages under this thread
mostRecentDate \DateTime most recent post on the thread
isLocked string Y if the thread is locked,, N otherwise
isSticky string Y if the thread is sticky,, N otherwise
usersOnline array userBasic array, a chatroom users online list
forum \gforge\plugins\forum\models\api\ForumBasic Forum which the Thread belongs to (optional data)

getForum

Searches for forums matching criteria, or retrieves a specific project by its database ID.

Parameters (1)

Name Type Description
request \mvcnphp\RequestParameters
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: \api\ForumBasic[]|\api\ForumBasic

No return type is defined

getMostRecentMessage

Finds the most recent message withing a given forum by forum ID.

Parameters (1)

Name Type Description
request \mvcnphp\RequestParameters

Return: \api\ForumMessageBasic|null

No return type is defined

getThreadparentcount

Get count of messages in a thread which do not have parent messages.

Parameters (0)

Name Type Description
No parameters

Return: int

count of messages.

POST

postForum

Create a new Forum

Parameters (4)

Name Type Description
section string Section of the forum. Required
refId int Reference Id of the forum. Required
forumName string Name of the forum. Required
isPublic bool Whether or not the forum is public. Required

Return: array

No return type is defined

Example 1

The following curl command:


  curl -d section=tracker -d refId=999 -d forumName=test -d isPublic=true --user username:password http://gforge.api/forum

Creates this forum:


{ section="tracker", refId=999, forumName="test", isPublic=true }

postThread

Create a new ForumThread

Parameters (1)

Name Type Description
request \mvcnphp\RequestParameters

Return: array

No return type is defined

Example 1


  curl -d section=tracker -d refId=999 -d forumName=test -d isPublic=true --user username:password http://gforge.api/forum/:forumId/thread/:id

postUserOffline

Set user as offline in all charoom he is on

Parameters (1)

Name Type Description
request \mvcnphp\RequestParameters

Return: boolean

No return type is defined

PUT

PUT is not available

DELETE

deleteForum

Delete a forum

Parameters (1)

Name Type Description
id int Id of forum to be deleted. This field is set in the resource location (DELETE /api/forum/[id]) Required

Return: (none)

No return type is defined

Example 1


  curl -X DELETE --user user:pass https://api.gforge.com/forum/1234

deleteThread

Delete a forum

Parameters (1)

Name Type Description
id int Id of forum to be deleted. This field is set in the resource location (DELETE /api/forum/[id]) Required

Return: (none)

No return type is defined

Example 1


  curl -X DELETE --user user:pass https://api.gforge.com/forum/1234