api:forum_topics
Table of Contents
Record field format
[table]
[thead]
[tr]
[th]Name[/th]
[th]Type[/th]
[th]Details[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]
id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
title[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
category_id[/td][td]integer[/td]
[td][0,1,2][/td]
[/tr]
[tr]
[td]
response_count[/td][td]integer[/td]
[td][/td]
[/tr]
[tr]
[td]
min_level[/td][td]integer[/td]
[td]Corresponds to the level of user (API:Users).[/td]
[/tr]
[tr]
[td]
is_deleted[/td][td]boolean[/td]
[td][/td]
[/tr]
[tr]
[td]
is_sticky[/td][td]boolean[/td]
[td][/td]
[/tr]
[tr]
[td]
is_locked[/td][td]boolean[/td]
[td][/td]
[/tr]
[tr]
[td]
creator_id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
updater_id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
created_at[/td][td]timestamp[/td]
[td][/td]
[/tr]
[tr]
[td]
updated_at[/td][td]timestamp[/td]
[td][/td]
[/tr]
[/tbody]
[/table]
Category ID
[table]
[thead]
[tr]
[th]Value[/th]
[th]Description[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]0[/td]
[td]General[/td]
[/tr]
[tr]
[td]1[/td]
[td]Tags[/td]
[/tr]
[tr]
[td]2[/td]
[td]Bugs & features[/td]
[/tr]
[/tbody]
[/table]
Associated attributes
[table]
[thead]
[tr]
[th]Name[/th]
[th]Type[/th]
[th]Number[/th]
[th]Availability[/th]
[th]Details[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]
creator[/td][td]user[/td]
[td]single[/td]
[td]required[/td]
[td]User that created the forum topic.[/td]
[/tr]
[tr]
[td]
updater[/td][td]user[/td]
[td]single[/td]
[td]required[/td]
[td]User that last updated the forum topic.[/td]
[/tr]
[tr]
[td]
original_post[/td][td]forum post[/td]
[td]single[/td]
[td]required[/td]
[td]The first forum post of a forum topic.[/td]
[/tr]
[/tbody]
[/table]
Nomenclature
- Plural form: "forum_topics"
- Used in the URL pathname
- Singular form: "forum_topic"
- Used for write parameters (Help:API Write Requests)
- Versions: none
Index
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/forum_topics.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]The default order is updated at descending.[/td]
[/tr]
[/tbody]
[/table]
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
idcategory_idresponse_countcreated_atupdated_at- Text syntax
title- User syntax
creatorupdater- Boolean syntax
is_deletedis_stickyis_locked- Chaining syntax
forum_postsbulk_update_requeststag_aliasestag_implications
Special search parameters
- Case-insensitive wildcard searching on the title text field.title_matches
- The status of an attached BUR. Can be: pending, approved, rejected.status
- Shows topics that have a min level set or not (Help:Boolean syntax).is_private
- Shows topics that have been read by the user or not (Help:Boolean syntax).is_read
- Unless this value is present, deleted forum_topics are hidden.is_deleted
Search order
Using the search parameter
order with one of the following values changes the order of the results.
- Shows sticky topics first, sorted by updated at second.sticky
- Orders by post count.post_count
The order can also be changed to ID descending by using sequential pagination.
Show
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/forum_topics/$id.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the forum topic ID.[/td][/tr]
[/tbody]
[/table]
Create
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]POST[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/forum_topics.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[/tbody]
[/table]
Create parameters
- Required:
title
- Can be: 0, 1, 2.category_id- Optional
- DText that will be used to create a forum post entry at the same time.original_post_attributes[body]- Is a hash value, so the final parameter format is
forum_topic[original_post_attributes][body]
Restricted to Moderator+
- Optional
- Can be: 0, 40, 50min_levelis_stickyis_lockedis_deleted
Update
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]PUT/PATCH[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/forum_topics/$id.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the forum topic ID.[/td][/tr]
[/tbody]
[/table]
Update parameters
Accepts the "same parameters":[#dtext-create-parameters] as the "create forum topic action":[#dtext-create]. All parameters are optional. Besides those, it also accepts the following additional optional parameters.
- The ID of the the first post on a topic.original_post_attributes[id]- Is a hash value, so the final parameter format is
forum_topic[original_post_attributes][id] - This parameter is required if the original post's body is being updated as well.
Delete
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]DELETE[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/forum_topics/$id.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the forum topic ID.Restricted to Moderator+.[/td]
[/tr]
[/tbody]
[/table]
Note: This action can also be accomplished using the "update forum topic action":[#dtext-update] by setting
is_deleted to true.
Undelete
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]POST[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/forum_topics/$id/undelete.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the forum topic ID.Restricted to moderator+.[/td]
[/tr]
[/tbody]
[/table]
Note: This action can also be accomplished using the "update forum topic action":[#dtext-update] by setting
is_deleted to false.
Mark all as read
Marks every topic as being read.
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]POST[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/forum_topics/mark_all_as_read.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[/tbody]
[/table]
See also
External links
[table]
[tbody]
[tr]
[td]Controller[/td]
[td]
[td][/td]
[/tr]
[tr]
[td]Model[/td]
[td]
[/tr]
[tr]
[td]Policy[/td]
[td]
[/tr]
[/tbody]
[/table]