ScrollX Tag Page

Api:Post Flags

0 sourcesWiki updated 1/22/2025
Browse all Api:Post Flags images →

About Api:Post Flags

Table of Contents

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

Record field format

NameTypeDetails
[code]id[/code]integer>0
[code]post_id[/code]integer>0
[code]reason[/code]string
[code]status[/code]enumSee Status table for list of acceptable values.
[code]is_resolved[/code]boolean
[code]creator_id[/code]integer>0, limited to Moderator+ or the flag creator
[code]created_at[/code]timestamp
[code]updated_at[/code]timestamp

Status

ValueEnum
0pending
1succeeded
2rejected

Associated attributes

NameTypeNumberAvailabilityDetails
[code]post[/code]postsinglerequiredPost that the flag belongs to.

Nomenclature

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

Index

HTTP MethodGET
Base URL[code]/post_flags.json[/code]
Typeread request
DescriptionThe default order is ID descending.

Search attributes

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

Special search parameters

  • [code]reason_matches[/code] - Case-insensitive wildcard search on the reason field.
  • [code]creator_id[/code] - Searches for flags by creator ID. Single ID only.
  • [code]creator_name[/code] - Searches for flags by creator name. Single name only.
  • [code]category_matches[/code] - Can be: normal, unapproved, rejected, deleted.

Search order

The search order can only be changed with the custom parameter.

Show

HTTP MethodGET
Base URL[code]/post_flags/$id.json[/code]
Typeread request
Description[code]$id[/code] is the post flag ID.

Create

HTTP MethodPOST
Base URL[code]/post_flags.json[/code]
Typewrite request

Create parameters

  • Required:
  • [code]post_id[/code]
  • [code]reason[/code]

See also

Controller<https://github.com/danbooru/danbooru/blob/master/app/controllers/post_flags_controller.rb>
Model<https://github.com/danbooru/danbooru/blob/master/app/models/post_flag.rb>
Policy<https://github.com/danbooru/danbooru/blob/master/app/policies/post_flag_policy.rb>

Api:Post Flags Gallery

0 visible posts on page 1