Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป
Search Changes Help
  • |
  • Posts (0) History

    Blacklisted (help)

    • guro
    • scat
    • furry -rating:g
    Disable all Re-enable all

    Recent Changes (all)

    • shima noriko
    • kamizuka yuki
    • iwakura natsuki
    • kimishima nana
    • takai sayaka
    • fuyuki miharu
    • evelyn hayworth
    • cynthia (moldavite)
    • vine trident
    • yung ming
    • stella arista
    • moldavite
    • ponzu
    • airi (quilt)
    • mizuki (quilt)
    • kyrie (quilt)
    • kanami (quilt)
    • ena (quilt)
    • hazawa tsugumi
    • sia (quilt)
    • takumi (quilt)
    • quilt (game)
    • icarly
    • drake & josh
    • frea nabbit (desktop army)

    Options

    • Wiki History
    • Discussions
    • What Links Here

    api:forum topics

    Table of Contents
    • 01. Record field format
    • 02. Associated attributes
    • 03. Nomenclature
    • 04. Index
    • 05. Show
    • 06. Create
    • 07. Update
    • 08. Delete
    • 09. Undelete
    • 10. Mark all as read
    • 11. See also
    • 12. External links

    The following includes the details of how to interface with the forum topic records through the API.

    Record field format

    NameTypeDetails
    idinteger>0
    titlestring
    category_idinteger[0,1,2]
    response_countinteger
    min_levelintegerCorresponds to the level of user (API:Users).
    is_deletedboolean
    is_stickyboolean
    is_lockedboolean
    creator_idinteger>0
    updater_idinteger>0
    created_attimestamp
    updated_attimestamp
    Category ID
    ValueDescription
    0General
    1Tags
    2Bugs & features

    Associated attributes

    NameTypeNumberAvailabilityDetails
    creatorusersinglerequiredUser that created the forum topic.
    updaterusersinglerequiredUser that last updated the forum topic.
    original_postforum postsinglerequiredThe first forum post of a forum topic.

    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

    HTTP MethodGET
    Base URL/forum_topics.json
    Typeread request
    DescriptionThe default order is updated at descending.
    Search attributes

    All of the following are standard attributes with all of their available formats and qualifiers.

    • Number syntax
      • id
      • category_id
      • response_count
      • created_at
      • updated_at
    • Text syntax
      • title
    • User syntax
      • creator
      • updater
    • Boolean syntax
      • is_deleted
      • is_sticky
      • is_locked
    • Chaining syntax
      • forum_posts
      • bulk_update_requests
      • tag_aliases
      • tag_implications
    Special search parameters
    • title_matches - Case-insensitive wildcard searching on the title text field.
    • status - The status of an attached BUR. Can be: pending, approved, rejected.
    • is_private - Shows topics that have a min level set or not (Help:Boolean syntax).
    • is_read - Shows topics that have been read by the user or not (Help:Boolean syntax).
    • is_deleted - Unless this value is present, deleted forum_topics are hidden.
    Search order

    Using the search parameter order with one of the following values changes the order of the results.

    • sticky - Shows sticky topics first, sorted by updated at second.
    • post_count - Orders by post count.

    The order can also be changed to ID descending by using sequential pagination.

    Show

    HTTP MethodGET
    Base URL/forum_topics/$id.json
    Typeread request
    Description$id is the forum topic ID.

    Create

    HTTP MethodPOST
    Base URL/forum_topics.json
    Typewrite request
    Create parameters
    • Required:
      • title
      • category_id - Can be: 0, 1, 2.
    • Optional
      • original_post_attributes[body] - DText that will be used to create a forum post entry at the same time.
        • Is a hash value, so the final parameter format is forum_topic[original_post_attributes][body]
    Restricted to Moderator+
    • Optional
      • min_level - Can be: 0, 40, 50
      • is_sticky
      • is_locked
      • is_deleted

    Update

    HTTP MethodPUT/PATCH
    Base URL/forum_topics/$id.json
    Typewrite request
    Description$id is the forum topic ID.
    Update parameters

    Accepts the same parameters as the create forum topic action. All parameters are optional. Besides those, it also accepts the following additional optional parameters.

    • original_post_attributes[id] - The ID of the the first post on a topic.
      • 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

    HTTP MethodDELETE
    Base URL/forum_topics/$id.json
    Typewrite request
    Description$id is the forum topic ID.
    Restricted to Moderator+.

    Note: This action can also be accomplished using the update forum topic action by setting is_deleted to true.

    Undelete

    HTTP MethodPOST
    Base URL/forum_topics/$id/undelete.json
    Typewrite request
    Description$id is the forum topic ID.
    Restricted to moderator+.

    Note: This action can also be accomplished using the update forum topic action by setting is_deleted to false.

    Mark all as read

    Marks every topic as being read.

    HTTP MethodPOST
    Base URL/forum_topics/mark_all_as_read.json
    Typewrite request

    See also

    • Help:Common URL Parameters
    • Help:API

    External links

    Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/forum_topics_controller.rb
    Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/forum_topic.rb
    Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/forum_topic_policy.rb
    Terms / Privacy / Upgrade / Contact /