Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป Listing Upload Hot Changes Help
A list of tags to help categorize this search. Space delimited.

Search

Blacklisted (help)

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

Tags

Options

Related

  • Deleted
  • Random
  • History
  • Discussions
  • Count
  • Posts Wiki Search »
  • Size
    • Small
    • Medium
    • Large
    • Huge
    • Huge
    • Gigantic
    • Absurd
    • Show scores
  • Edit

    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. See also
    • 11. External links

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

    Record field format

    NameTypeDetails
    idinteger>0
    post_idinteger>0
    bodystring
    scoreinteger
    is_deletedboolean
    is_stickyboolean
    do_not_bump_postboolean
    creator_idinteger>0
    updater_idinteger>0
    created_attimestamp
    updated_attimestamp
    creator_ip_addrinetLimited to Moderator+
    updater_ip_addrinetLimited to Moderator+

    Associated attributes

    NameTypeNumberAvailabilityDetails
    creatorusersinglerequired
    updaterusersinglerequired
    postpostsinglerequired

    Nomenclature

    • Plural form: "comments"
      • Used in the URL pathname
    • Singular form: "comment"
      • Used for write parameters (Help:API Write Requests)
    • Versions: none

    Index

    HTTP MethodGET
    Base URL/comments.json
    Typeread request
    DescriptionThe default order is ID descending.

    Note: group_by as a parameter must be set to comment, or else posts will be returned instead (e.g. group_by=comment).

    Search attributes

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

    • Number syntax
      • id
      • score
      • created_at
      • updated_at
    • Text syntax
      • body
    • Boolean syntax
      • is_deleted
      • is_sticky
      • do_not_bump_post
    • Post syntax
      • post
    • User syntax
      • creator
      • updater
    Special search parameters
    • body_matches - Case-insensitive wildcard searching on the body text field.
    • order - Sets the order of results.
      • post_id - Orders by post ID.
      • score - Orders by comment score.
      • updated_at - Orders by updated_at timestamp.

    Show

    HTTP MethodGET
    Base URL/comments/$id.json
    Typeread request
    Description$id is the comment ID.

    Create

    HTTP MethodPOST
    Base URL/comments.json
    Typewrite request
    Create parameters
    • Required:
      • post_id
      • body
    • Optional
      • do_not_bump_post
    Restricted to Moderator+
    • Optional
      • is_sticky

    Update

    HTTP MethodPUT/PATCH
    Base URL/comments/$id.json
    Typewrite request
    Description$id is the comment ID.
    Update parameters
    • Optional:
      • body
      • is_deleted
    Restricted to Moderator+
    • Optional
      • is_sticky

    Delete

    HTTP MethodDELETE
    Base URL/comments/$id.json
    Typewrite request
    Description$id is the comment ID.

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

    Undelete

    HTTP MethodPOST
    Base URL/comments/$id/undelete.json
    Typewrite request
    Description$id is the comment ID.

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

    See also

    • Help:Common URL Parameters
    • Help:API

    External links

    Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/comments_controller.rb
    Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/comment.rb
    Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/comment_policy.rb

    View wiki

    No posts found.

    1
    Terms / Privacy / Upgrade / Contact /