[wp-trac] [WordPress Trac] #56546: Permit queries by ID in /search REST endpoint
WordPress Trac
noreply at wordpress.org
Sun Sep 11 18:17:00 UTC 2022
#56546: Permit queries by ID in /search REST endpoint
-------------------------+-----------------------------
Reporter: kadamwhite | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Keywords:
Focuses: rest-api |
-------------------------+-----------------------------
At present there is no way to retrieve a resource if you only know its
object type, but not its subtype. Because terms and posts are segregated
by term type and post type, if I know I have a custom post type object of
ID 12, I cannot get any further information about it from the REST API
without somehow either determining its object subtype, or trying all
custom post type endpoints in turn.
The `/search` controller permits searching across subtypes, but does not
support the "include" and "exclude" parameters common to individual post
type endpoints. We should support these parameters on the `search/`
endpoint, so that (when relevant) there is a way to query for results
across subtypes with or without a specific list of IDs.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56546>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list