Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for accessing lists of document references as subresources #28

Open
mitar opened this issue Sep 18, 2012 · 2 comments
Open

API for accessing lists of document references as subresources #28

mitar opened this issue Sep 18, 2012 · 2 comments

Comments

@mitar
Copy link
Member

mitar commented Sep 18, 2012

API for accessing lists of document references as subresources. Currently only access to lists of embedded documents is possible.

@mitar
Copy link
Member Author

mitar commented Oct 8, 2012

Is #21 connected to this issue?

@mitar
Copy link
Member Author

mitar commented Oct 13, 2012

Some initial work has been done. But main thing it is still missing: to be able to work with list of referenced documents through a subresouce. This means you would be able to add a new object to a list by POSTing to subresource list end-point (eg. POST /api/v1/resource/<id>/reflist/), getting a list of all objects (with limits applied) by doing GET (eg. GET /api/v1/resource/<id>/reflist/). And also deleting from a list (eg. DELETE /api/v1/resource/<id>/reflist/<refid>/).

But it is also a bit tricky in comparison with embedded list. Because while we want DELETE to work (to remove from the list), we do not want that referenced objects have two URIs. So for example, GET /api/v1/resource/<id>/reflist/<refid>/ should probably redirect to its main URI. POST/PUT/PATCH should probably fail (or redirect to main URI? would that mean that post succeeded?).

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

No branches or pull requests

1 participant