Opened 9 years ago
Closed 9 years ago
#34303 closed task (blessed) (fixed)
Update the REST API header links
Reported by: | johnbillion | Owned by: | rmccue |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | REST API | Keywords: | dev-feedback |
Focuses: | Cc: |
Description
The link
tag and Link
header, produced by rest_output_link_wp_head()
and rest_output_link_header()
respectively, both include a rel
attribute with a value of https://github.com/WP-API/WP-API
.
Should these change? If so, what to?
Attachments (1)
Change History (12)
#2
@
9 years ago
- Owner set to rmccue
- Status changed from new to assigned
Good catch. These need to stay as URIs; they're kinda like XML namespaces in that they're just an unambiguous name. I've spoken to @nacin previously about this, and http://api.w.org/
was an option. It's nice and short, and it's currently unused. We could have it redirect to a devhub page too.
We'll need to use other stuff from this in the future too; custom relations are used in our links like http://v2.wp-api.org/term
. I think http://api.w.org/v2/term
would work nicely, and it's short.
WP-API
in the RSD can be whatever we want. It's designed to allow conditional upgrading from existing XML-RPC clients, so "WordPress REST API" could work. ("REST API" could in theory clash with a future XML-RPC spec, if those are still being created.)
This ticket was mentioned in Slack in #core-restapi by rmccue. View the logs.
9 years ago
#4
@
9 years ago
and http://api.w.org/ was an option. It's nice and short, and it's currently unused.
Although I'm not too fond of re-using subdomains where it's potentially ambiguous as to what resource we're using, that sounds viable to me.
The ambiguous issues come into play where today we shorten wordpress.org
to w.org
for resources, and I can see someone thinking api.w.org
is short-hand for api.wordpress.org
.
We'll need to use other stuff from this in the future too; custom relations are used in our links like http://v2.wp-api.org/term. I think http://api.w.org/v2/term would work nicely, and it's short.
This makes me think that using the short domain is worthwhile despite the shortcomings, and I feel the new url format there makes sense to use.
As a final mention, even though we're still talking about completely different domains..api.wordpress.org
also matches the format of api.wordpress.org/$foo/$bar/$version/
which doesn't conflict with this.
#5
@
9 years ago
Patch attached to change the links; we'll also need to update link relations in the endpoints.
@danielbachhuber @joehoyle Are both of you +1 on this? (No emoji on Trac makes Ryan sad.)
rest_output_rsd()
also refers toWP-API
.