api:forum posts
Table of Contents
- 01. Record field format
- 02. Associated attributes
- 03. Index
- 04. Show
- 05. Create
- 06. Update
- 07. Delete
- 08. Undelete
- 09. See also
- 10. External links
This page has details for how to interact with forum post records through the API.
Record field format
| Name | Type | Details |
|---|---|---|
id | integer | >0 |
topic_id | integer | >0 |
body | string | |
is_deleted | boolean | |
creator_id | integer | >0 |
updater_id | integer | >0 |
created_at | timestamp | |
updated_at | timestamp |
Associated attributes
The following is the list of relations that can be included in the API results (see Help:Common URL parameters for more info):
| Name | Type | Number | Availability | Details |
|---|---|---|---|---|
creator | user | single | required | User that created the forum post. |
updater | user | single | required | User that last updated the forum post. |
topic | forum topic | single | required | Forum topic the forum post is on. |
dtext_links | dtext link | multiple | optional | Dtext links on the forum post. |
votes | forum post vote | multiple | optional | Any votes the forum post may have. |
tag alias | tag alias | multiple | optional | Tag aliases linked to the forum post. |
tag implication | tag implication | multiple | optional | Tag implications linked to the forum post. |
bulk update request | bulk update request | multiple | optional | Bulk update requests linked to the forum post. |
Index
Returns multiple forum post records.
| HTTP Method | GET |
| Base URL | /forum_posts.json |
| Type | read request |
| Description | The default order is updated at descending. |
Search attributes
Search parameters take the following format (see Help:Common URL parameters for more info):
search[FIELD]=VALUE
The following are the base fields along with their associated type. Check the syntax pages for all of the available variations.
- Number syntax
idtopic_idcreated_atupdated_at- Text syntax
body- User syntax
creatorupdater- Boolean syntax
is_deleted- Chaining syntax
topicdtext_linksvotestag aliastag implicationbulk update request
Special search parameters
The following are additional search fields.
linked_to- Shows forum posts that link to a particular wiki.- The parameter must use the same format as the wiki title.
- I.e. all lowercase and underscores instead of spaces.
Search order
Using the search parameter order with one of the following values changes the order of the results.
custom- Help:Common URL parameters- In order to use this order,
search[id]must also be set with a list of comma-separated IDs.
Show
Returns a single forum post record.
| HTTP Method | GET |
| Base URL | /forum_posts/$id.json |
| Type | read request |
| Description | $id is the forum post ID. |
Create
Creates a single forum post record.
| HTTP Method | POST |
| Base URL | /forum_posts.json |
| Type | write request |
Create parameters
- Required:
bodytopic_id
Update
Updates a single forum post record.
| HTTP Method | PUT/PATCH |
| Base URL | /forum_posts/$id.json |
| Type | write request |
| Description | $id is the forum post ID. |
Update parameters
- Optional:
body
Delete
Deletes a single forum post record.
| HTTP Method | DELETE |
| Base URL | /forum_posts/$id.json |
| Type | write request |
| Description | $id is the forum post ID.Restricted to Moderator+. |
Undelete
Undeletes a single forum post record.
| HTTP Method | POST |
| Base URL | /forum_posts/$id/undelete.json |
| Type | write request |
| Description | $id is the forum post ID.Restricted to Moderator+. |
