Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Collections: Get collection shares

natasab edited this page Dec 23, 2014 · 3 revisions

##GET /collections/:id/shares

Retrieves information about the shares of the collection with provided :id

###Supported actions

A user can provide a share for a collection for following actions:

  • READ- retrieve the collection and its items no matter the status of the collection
  • UPLOAD_ITEMS - upload new media in the collection (thus create new items in the collection)
  • EDIT_ITEMS - edit the metadata or replace the media of an existing item in the collection
  • DELETE_ITEMS - remove media (items) from the collection
  • EDIT_COLLECTION - edit the descriptive metadata (title, description, contributors etc.) of the collection
  • EDIT_PROFILE - modify the metadata profile of the collection (the metadata profile applied to the items in the collection in order to describe them)
  • ADMINISTER - administer the collection (create new shares, release/discard the collection)

####Response status codes #####200 OK Successful retrieval of the collection shares with provided :id

#####404 Not found The collection with provided :id is not found (does not exist)

#####401 Unauthorized Authentication is necessary to retrieve the collection shares

#####403 Forbidden Wrong credentials provided to retrieve this collection shares (e.g. pending collection, but a user who is not creator of this collection and does not have a share for this collection tries to retrieve it)

####Example request curl http:///collections/FKMxUpYdV9N2J4XG/shares

####Example response {
"id":"FKMxUpYdV9N2J4XG", "title":"Research Data", "description":"Test for research data", "shares":[
{
"id":"FKMxUpYdV9N2J4XG11", "action":"READ", "createdDate":"2014-10-09T13:01:49 +0200", "validUntil":"", "createdBy":{
"fullname":"White, John", "userId":"zhcQKsMR0A9SiC6x" }, "assignedTo":{
"fullname":"Black, John", "userId":"zhcQKsMR0A9SiC6x" } }, {
"id":"FKMxUpYdV9N2J4XG12", "action":"READ", "createdDate":"2014-10-10T13:01:49 +0200", "validUntil":"", "createdBy":{
"fullname":"White, John", "userId":"zhcQKsMR0A9SiC6x" }, "assignedTo":{
"fullname":"Red, John", "userId":"zhcQKsMR0A9SiC8x" } }, ] }

Clone this wiki locally