Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป
Search Changes Help | Posts (0) History
  • Help
guro
scat
furry -rating:g

Recent Changes (all)

  • white glint
  • mass blade (armored core)
  • grind blade (armored core)
  • hayase anna
  • giga missile (armored core)
  • giga cannon (armored core)
  • kujou sumire
  • legion pulse (armored core)
  • seto kanon
  • jashin omega
  • ultimate weapon (armored core)
  • crest cr-c840/ul lightweight type
  • armored core: silent line
  • awayuki kanade
  • crest cr-c98e2 assault type
  • sneed's feed and seed (meme)
  • howler (p5x)
  • al sneed
  • charles tamzarian
  • persona 5: the phantom x
  • nagao manaka
  • ange (p5x)
  • ukinami yuzuha (tanuki in broad daylight)
  • alice thymefield (sea of thyme)
  • ukinami yuzuha

Options

  • Wiki History
  • Discussions
  • What Links Here

api:comments

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
Terms / Privacy / Upgrade / Contact /