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)

  • tag group:fashion style
  • about:userscripts
  • cu chulainn (honkai: star rail) (fate)
  • saints row
  • jabara tornado
  • houou alma
  • crane game
  • saints row (reboot)
  • saints row iv
  • saints row: the third
  • primordial albedo
  • list of songs and costumes from link! like! love live!
  • rhythmic dance (shining nikki)
  • shining dance (shining nikki)
  • specter alma
  • moonset song (shining nikki)
  • moonlight song (shining nikki)
  • lavleyart
  • aphelandra
  • feature phone
  • kawasugi sakura
  • golden wolflord (genshin impact)
  • astral sonata (shining nikki)
  • flip phone
  • spider girl

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 /