Opened 4 years ago
Last modified 8 months ago
#53063 assigned enhancement
Add batch support to core REST resources
Reported by: | chrisvanpatten | Owned by: | TimothyBlynJacobs |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 5.6 |
Component: | REST API | Keywords: | has-patch has-unit-tests |
Focuses: | rest-api | Cc: |
Description
#50244 introduced batch operation functionality to the WordPress REST API, but it remains disabled in WordPress' core endpoints. It would be great to see this functionality available on core endpoints for manipulating core resources.
Due to some complexity around GET requests which may spin off expensive queries, a first step may be to only enable batch processing for creatable/editable/deletable requests.
Change History (9)
#1
@
3 years ago
- Milestone changed from Awaiting Review to 5.9
- Owner set to TimothyBlynJacobs
- Status changed from new to assigned
- Version set to 5.6
This ticket was mentioned in PR #1833 on WordPress/wordpress-develop by spacedmonkey.
3 years ago
#2
- Keywords has-patch added
This ticket was mentioned in PR #1836 on WordPress/wordpress-develop by spacedmonkey.
3 years ago
#3
- Keywords has-unit-tests added
Trac ticket: https://core.trac.wordpress.org/ticket/53063
TimothyBJacobs commented on PR #1836:
3 years ago
#4
Thanks @spacedmonkey! Left two comments, each feedback item appears multiple times.
#6
@
3 years ago
- Milestone changed from 5.9 to Future Release
- Type changed from defect (bug) to enhancement
The necessary parts for 5.9 have been committed.
#8
@
8 months ago
We were working on importing a large number of users as part of a migration project to WordPress / WooCommerce to discover that WP REST API does not support batching for Users in WP_REST_Users_Controller
since allow_batch
is not explicitly set to true
in register_rest_route
.
Is there a particular reason batching was not enabled for users?
Would it make sense to add this similarly to WP_REST_Posts_Controller
?
#9
@
8 months ago
I submitted a PR enabling batch users operations via REST API here https://github.com/WordPress/wordpress-develop/pull/6364
More details in the ticket https://core.trac.wordpress.org/ticket/60895
Trac ticket: https://core.trac.wordpress.org/ticket/53063