Miyuu's Image Board

api:bulk_update_requests

Table of Contents* 1. "Record field format":#dtext-record
* 2. "Associated attributes":#dtext-associations
* 3. "Nomenclature":#dtext-nomenclature
* 4. "Actions":#dtext-actions
** 4.01 "Index":#dtext-index
** 4.02 "Show":#dtext-show
** 4.03 "Create":#dtext-create
** 4.04 "Update":#dtext-update
** 4.05 "Delete":#dtext-delete
** 4.06 "Approve":#dtext-approve
* 5. "See also":#dtext-see-also
* 6. "External links":#dtext-external-links

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


Note: Only upload records created by oneself are visible, unless you are an Admin (Help:Users).


h4#record. Record field format


[table]

[thead]

[tr]

[th]Name[/th]

[th]Type[/th]

[th]Details[/th]

[/tr]

[/thead]

[tbody]

[tr]

[td]

id
[/td]

[td]integer[/td]

[td]>0[/td]

[/tr]

[tr]

[td]
user_id
[/td]

[td]integer[/td]

[td]>0[/td]

[/tr]

[tr]

[td]
approver_id
[/td]

[td]integer[/td]

[td]>0[/td]

[/tr]

[tr]

[td]
forum_topic_id
[/td]

[td]integer[/td]

[td]>0[/td]

[/tr]

[tr]

[td]
forum_post_id
[/td]

[td]integer[/td]

[td]>0[/td]

[/tr]

[tr]

[td]
script
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
status
[/td]

[td]string[/td]

[td]
[pending, approved, rejected, processing, failed]
[/td]

[/tr]

[tr]

[td]
created_at
[/td]

[td]timestamp[/td]

[td][/td]

[/tr]

[tr]

[td]
updated_at
[/td]

[td]timestamp[/td]

[td][/td]

[/tr]

[/tbody]

[/table]


h4#associations. Associated attributes


[table]

[thead]

[tr]

[th]Name[/th]

[th]Type[/th]

[th]Number[/th]

[th]Availability[/th]

[th]Details[/th]

[/tr]

[/thead]

[tbody]

[tr]

[td]

user
[/td]

[td]user[/td]

[td]single[/td]

[td]required[/td]

[td][/td]

[/tr]

[tr]

[td]
approver
[/td]

[td]user[/td]

[td]single[/td]

[td]optional[/td]

[td][/td]

[/tr]

[tr]

[td]
forum_topic
[/td]

[td]forum_topic[/td]

[td]single[/td]

[td]required[/td]

[td][/td]

[/tr]

[tr]

[td]
forum_post
[/td]

[td]forum_post[/td]

[td]single[/td]

[td]required[/td]

[td][/td]

[/tr]

[/tbody]

[/table]


h4#nomenclature. Nomenclature


* Plural form: "bulk_update_requests"

** Used in the URL pathname

* Singular form: "bulk_update_request"

** Used for write parameters (Help:API Write Requests)

* Versions: none


h4#actions. Actions


These are the various actions that can be done with bulk update request records.


[hr]


h5#index. Index


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/bulk_update_requests.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]read_request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]The default order is ID descending[/td]

[/tr]

[/tbody]

[/table]


h6#search-attributes. Search attributes


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


* Number_syntax

**

id


**
created_at


**
updated_at


* Text_syntax

**
script


* User_syntax

**
user


**
approver


* Chaining_syntax

**
forum_topic


**
forum_post


**
tags


h6#special-search-parameters. Special search parameters


*

status
- The status of the bulk update request (separated by commas).


[hr]


h5#show. Show


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/bulk_update_requests/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]read_request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the bulk update request ID[/td]

[/tr]

[/tbody]

[/table]


h5#Create. Create


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]POST[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/uploads.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write_request[/td]

[/tr]

[/tbody]

[/table]


h6#create-parameters. Create parameters


* Mandatory:

**

script


**
title


**
reason


**
forum_topic_id


Note:If forum topic ID is present, then title will be ignored. If forum topic ID is absent, then title will be used to create a new forum topic. The reason will be used to create a new forum post.


[hr]


h5#update. Update


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]PUT/PATCH[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/bulk_update_request/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write_request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the bulk update request ID[/td]

[/tr]

[/tbody]

[/table]


h6#update-parameters. Update parameters


* Optional:

**

script


* Admin-only parameters:

**

forum_post_id


**
forum_topic_id


[hr]


h5#delete. Delete


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]DELETE[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/bulk_update_request/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write_request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the bulk update request ID[/td]

[/tr]

[/tbody]

[/table]


Note: Only the user that created the bulk update request or an Admin may delete it.


[hr]


h5#approve. Approve


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]POST[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/bulk_update_request/$id/approve.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write_request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the bulk update request ID[/td]

[/tr]

[/tbody]

[/table]


Note: Builders and above can approve bulk update requests that:




* Rename or alias

* Only artist tags

* Post count must be less than 200


Otherwise, only an admin may approve that request.

[hr]


h4#see-also. See also


* Help:Common URL Parameters

* Help:API


h4#external-links. External links


[table]

[tbody]

[tr]

[td]Controller[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td]Model[/td]

[td][/td]

[/tr]

[tr]

[td]Policy[/td]

[td][/td]

[/tr]

[/tbody]

[/table]