<< Back to GForge REST API

Entity: Forum

GET

getChat

Get a reference to the chat thread.

Parameters (0)

Name Type Description
No parameters

Return: \ForumThreadBasic

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

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

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

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

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

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: bool

PUT

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)

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)

Example 1


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