The following includes the details of how to interface with the post appeal records through the API.
Record field format
| Name | Type | Details |
|---|
| [code]id[/code] | integer | >0 |
| [code]post_id[/code] | integer | >0 |
| [code]reason[/code] | string | |
| [code]status[/code] | enum | See Status table for list of acceptable values. |
| [code]creator_id[/code] | integer | >0 |
| [code]created_at[/code] | timestamp | |
| [code]updated_at[/code] | timestamp | |
Status
| Value | Enum |
|---|
| 0 | pending |
| 1 | succeeded |
| 2 | rejected |
Associated attributes
| Name | Type | Number | Availability | Details |
|---|
| [code]creator[/code] | user | single | required | User that created the forum topic. |
| [code]post[/code] | post | single | required | Post that the appeal belongs to. |
Nomenclature
- Plural form: "post appeals"
- Used in the URL pathname
- Singular form: "post appeal"
- Used for write parameters (Help:API Write Requests)
- Versions: none
Index
| HTTP Method | GET |
| Base URL | [code]/post_appeals.json[/code] |
| Type | read request |
| Description | The default order is ID descending. |
All of the following are standard attributes with all of their available formats and qualifiers.
- [code]reason_matches[/code] - Case-insensitive wildcard search on the reason field.
Search order
The search order can only be changed with the custom parameter.
Show
| HTTP Method | GET |
| Base URL | [code]/post_appeals/$id.json[/code] |
| Type | read request |
| Description | [code]$id[/code] is the post appeal ID. |
Create
| HTTP Method | POST |
| Base URL | [code]/post_appeals.json[/code] |
| Type | write request |
- Required:
- [code]post_id[/code]
- [code]reason[/code]
See also
External links
| Controller | <https://github.com/danbooru/danbooru/blob/master/app/controllers/post_appeals_controller.rb> | |
| Model | <https://github.com/danbooru/danbooru/blob/master/app/models/post_appeal.rb> |
| Policy | <https://github.com/danbooru/danbooru/blob/master/app/policies/post_appeal_policy.rb> |