Skip to content

Loading…

API for accessing lists of document references as subresources #28

Open
mitar opened this Issue · 2 comments

1 participant

@mitar
wlan slovenija member

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

@mitar
wlan slovenija member

Is #21 connected to this issue?

@mitar
wlan slovenija member

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
Something went wrong with that request. Please try again.