[wp-trac] [WordPress Trac] #49116: Add Links to the REST version of a Resource in the header of the page
WordPress Trac
noreply at wordpress.org
Wed Jan 1 21:55:06 UTC 2020
#49116: Add Links to the REST version of a Resource in the header of the page
-------------------------+-------------------------------------------------
Reporter: dshanske | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Keywords: needs-patch needs-unit-tests dev-
Focuses: rest-api | feedback
-------------------------+-------------------------------------------------
Proposing as suggested by @timothybjacobs in Slack, that on each page, a
link in the header of the HTML file to the REST route for that resource.
So, an author page would link to the user endpoint for that user. A post
to the rest route to that specific post, etc.
The rel on the link to the REST API endpoint is rel="https://api.w.org/".
This should probably be a rel="alternate" which indicates an alternative
representation of the page, with type "application/json" as it is
technically a json representation of the page, but this may need more
discussion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49116>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list