api:bulk update requests
Table of Contents
- 01. Record field format
- 02. Associated attributes
- 03. Index
- 04. Show
- 05. Create
- 06. Update
- 07. Destroy
- 08. Approve
- 09. See also
- 10. External links
This page has details for how to interact with bulk update request records through the API.
01 Record field format
| Name | Type | Details |
|---|---|---|
id | integer | >0 |
user_id | integer | >0 |
approver_id | integer | >0 |
forum_topic_id | integer | >0 |
forum_post_id | integer | >0 |
script | string | |
status | string | [pending, approved, rejected, processing, failed] |
created_at | timestamp | |
updated_at | timestamp |
02 Associated attributes
The following is the list of relations that can be included in the API results (see Help:Common URL parameters for more info):
| Name | Type | Number | Availability | Details |
|---|---|---|---|---|
user | user | single | required | |
approver | user | single | optional | |
forum_topic | forum topic | single | required | |
forum_post | forum post | single | required |
03 Index
Returns multiple bulk update request records.
| HTTP Method | GET |
| Base URL | /bulk_update_requests.json |
| Type | read request |
| Description | The default order is ID descending |
Search attributes
Search parameters take the following format (see Help:Common URL parameters for more info):
search[FIELD]=VALUE
The following are the base fields along with their associated type. Check the syntax pages for all of the available variations.
- Number syntax
idcreated_atupdated_at- Text syntax
script- Array syntax
tags- User syntax
userapprover- Chaining syntax
forum_topicforum_post
Special search parameters
The following are additional search fields.
status- The status of the bulk update request (separated by commas).
Search order
Using the search parameter order with one of the following values changes the order of the results.
id_desc- ID descending.id_asc- ID ascending.updated_at_desc- Updated at descending.updated_at_asc- Updated at ascending.custom- Help:Common URL parameters- In order to use this order,
search[id]must also be set with a list of comma-separated IDs.
04 Show
Returns a single bulk update request record.
| HTTP Method | GET |
| Base URL | /bulk_update_requests/$id.json |
| Type | read request |
| Description | $id is the bulk update request ID. |
05 Create
Creates a single bulk update request record.
| HTTP Method | POST |
| Base URL | /bulk_update_requests.json |
| Type | write request |
Create parameters
Bulk update request parameters take the following format (see Help:API Write Requests for more info):
bulk_update_request[FIELD]=VALUE
- Mandatory:
scriptreason
If the forum topic ID is present, then the title is ignored, and the BUR gets attached to the assigned forum topic ID.
- Option 1
forum_topic_id
If forum topic ID is absent, then title will be used to create a new forum topic.
- Option 2
title
In either case, the reason will be used to create a new forum post.
06 Update
Updates a single bulk update request record.
| HTTP Method | PUT/PATCH |
| Base URL | /bulk_update_request/$id.json |
| Type | write request |
| Description | $id is the bulk update request ID.Only non-approved BURs can be updated. |
Update parameters
- Optional:
script
- Admin-only parameters:
forum_post_idforum_topic_id
Note: Only the creator or an Admin can update a bulk update request.
07 Destroy
Deletes a single bulk update request record.
| HTTP Method | DELETE |
| Base URL | /bulk_update_request/$id.json |
| Type | write request |
| Description | $id is the bulk update request ID.Only pending BURs can be deleted. |
Note: Only the creator or an Admin can delete a bulk update request.
09 Approve
Approves a single bulk update request record.
| HTTP Method | POST |
| Base URL | /bulk_update_request/$id/approve.json |
| Type | write request |
| Description | $id is the bulk update request ID.Only non-approved BURs can be updated. |
Approval conditions
Builders and above can approve bulk update requests that:
- Creator of the bulk update request
renameoraliascommands- Only artist tags
- The antecedent must be an artist tag
- The consequent must be:
- An artist tag
- A non-exitent tag
- An empty tag of any category
- Post count must be less than or equeal to 200
- For the antecedent
- For the consequent if it is a non-empty artist tag
Otherwise, only an admin can approve that request.
