Issue #3850
closedReturn relative URIs (e.g. /pulp/api/v3/repositories/1/) in the API
Description
The hrefs for objects returned from the bindings have full urls with hostname, port, etc. However, there are a couple reasons for this:
1. Katello has said their user base sometimes switches hostname/port/etc. So having full URIs means that they would be mutable.
2. The bindings require relative URIs
3. Full URIs are shorter and this means storing less data for third-party apps and such.
We should be returning relative URIs in our API for all hrefs. This includes places like created_resources in the task response.
Related issues
Updated by daviddavis about 6 years ago
- Subject changed from Binding url formats are inconsistent to Binding URI formats are inconsistent
Updated by daviddavis almost 6 years ago
- Subject changed from Binding URI formats are inconsistent to Use relative URIs (e.g. /pulp/api/v3/repositories/file/1/)
- Description updated (diff)
Updated by daviddavis almost 6 years ago
- Subject changed from Use relative URIs (e.g. /pulp/api/v3/repositories/file/1/) to Return relative URIs (e.g. /pulp/api/v3/repositories/file/1/) in the API
- Description updated (diff)
Updated by bmbouter almost 6 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
This looks right to me. It's consistent with the recent postings of the id vs href special interest group. I'm marking as groomed and sprint candidate.
Updated by daviddavis almost 6 years ago
- Subject changed from Return relative URIs (e.g. /pulp/api/v3/repositories/file/1/) in the API to Return relative URIs (e.g. /pulp/api/v3/repositories/1/) in the API
Updated by dkliban@redhat.com almost 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dkliban@redhat.com
Added by dkliban@redhat.com almost 6 years ago
Updated by dkliban@redhat.com almost 6 years ago
- Status changed from ASSIGNED to POST
Added by dkliban@redhat.com almost 6 years ago
Revision ca8361f9 | View on GitHub
Update docs and code for relative hrefs
Added by dkliban@redhat.com almost 6 years ago
Revision 10992664 | View on GitHub
Problem: identity fields are serialized as full URLs
Solution: stop passing request to the serializer so it can only form relative URLs
This patch modifies the behavior of DetailIdentityField and it also adds an additional
ItentityField RelatedField NestedRelatedField NestedIdentityField
to replace
HyperlinkIdentityField HyperlinkRelatedField NestedHyperlinkedIdentityField NestedHyperlinkedRelatedField
provided by DRF and DRF nested.
Required PR: https://github.com/pulp/pulp_file/pull/114
Added by dkliban@redhat.com almost 6 years ago
Revision 10992664 | View on GitHub
Problem: identity fields are serialized as full URLs
Solution: stop passing request to the serializer so it can only form relative URLs
This patch modifies the behavior of DetailIdentityField and it also adds an additional
ItentityField RelatedField NestedRelatedField NestedIdentityField
to replace
HyperlinkIdentityField HyperlinkRelatedField NestedHyperlinkedIdentityField NestedHyperlinkedRelatedField
provided by DRF and DRF nested.
Required PR: https://github.com/pulp/pulp_file/pull/114
Updated by dkliban@redhat.com almost 6 years ago
- Status changed from POST to MODIFIED
Updated by kersom almost 6 years ago
- Related to Test #4123: Test the generated API binds added
Updated by bmbouter over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Updated by ggainey over 4 years ago
- Tags Katello added
- Tags deleted (
Katello-P1)
Switches FileContent to using relative URLs for href
Required PR: https://github.com/pulp/pulp/pull/3607
re: #3850 https://pulp.plan.io/issues/3850