Skip to content
This repository was archived by the owner on Feb 29, 2020. It is now read-only.

Support for recognizing partial resources #6

Open
fosdev opened this issue Jun 6, 2014 · 4 comments
Open

Support for recognizing partial resources #6

fosdev opened this issue Jun 6, 2014 · 4 comments

Comments

@fosdev
Copy link
Contributor

fosdev commented Jun 6, 2014

Since embedded resources can be partial, need a mechanism to indicate that. One option may be to add a full_href attribute to a link object. This would indicate that there is a full version and an the current is partial. E.g. self link to embedded partial and have like that can be used to get full representation.

@sheavalentine-mdsol
Copy link
Contributor

Link Fragments can handle this.

http://server.com/foo/bar#baz/bing

@sheavalentine-mdsol
Copy link
Contributor

@sheavalentine-mdsol
Copy link
Contributor

@fosdev

Okay, so I think the answer is:

"""

When a resource is embedded and it is partial or incomplete, the service SHOULD supply a 'canonical' link relation specifying the preferred version. In this case the 'self' link should describe as much as possible the resource with the appropriate reference to the object.
For example, if a list resource has been filtered. That resource should provide a 'canonical' link to the resource in an unfiltered state, and the 'self' link should include the parameters which filtered it if they are available.
If the resource is shown with only sub elements shown, fragment identifiers SHOULD be provided in the 'self' link as per http://tools.ietf.org/html/rfc3986
"""

This strikes me as belonging in Best Practices as opposed to the Spec Proper.

@fosrias
Copy link

fosrias commented Jul 22, 2014

Well, that would imply the only way to control getting a partial resource
is through using fragments. A common pattern for negotiating a lighter
version of a resource is using say a fields query parameter. I don't like
the idea of introspecting a self link to decide which query parameters to
strip and just adding a fragment like #partial does not cover it because if
you do remove the fragment, the URI with those query parameters would still
return the partial resource.

So, if we introspect for fragments and strip the fragment, that could be
one way of doing it, but not completely sure this is the best way. Thoughts
w/r to my sample fields scenario, etc.?

On Tue, Jul 22, 2014 at 8:14 AM, Shea Valentine [email protected]
wrote:

Okay, so I think the answer is:

When a resource is embedded and it is partial or incomplete, the service
SHOULD supply a 'canonical' link relation specifying the preferred version.
In this case the 'self' link should describe as much as possible the
resource with the appropriate reference to the object.
For example, if a list resource has been filtered. That resource should
provide a 'canonical' link to the resource in an unfiltered state, and the
'self' link should include the parameters which filtered it if they are
available.
If the resource is shown with only sub elements shown, fragment
identifiers SHOULD be provided in the 'self' link as per
http://tools.ietf.org/html/rfc3986

This strikes me as belonging in Best Practices as opposed to the Spec
Proper.


Reply to this email directly or view it on GitHub
#6 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants