Manage item sharing.
Share an item with some users and set its access type.
| name | type | description |
|---|---|---|
| defaultAccessType | form | default access type Possible values: READ_ONLY, WRITE_OWNER, WRITE_ALL, ADMINISTRATOR |
| users | form | set of users |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | id of the item |
| media type | data type |
|---|---|
| multipart/form-data | (custom) |
| media type | data type | description |
|---|---|---|
| text/plain | string | id of the shared item |
PUT /items/{id}/share
Content-Type: multipart/form-data
Accept: text/plain
Authorization: ...
--------boundaryString
Content-Disposition: form-data; name="users"
user1
--------boundaryString
Content-Disposition: form-data; name="users"
user2
--------boundaryString
Content-Disposition: form-data; name="defaultAccessType"
READ_ONLY
------boundaryString--
...
HTTP/1.1 204 No Content
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e
Unshare an item with some users.
| name | type | description |
|---|---|---|
| users | form | set of users |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | id of the item |
| media type | data type |
|---|---|
| multipart/form-data | (custom) |
| media type | data type | description |
|---|---|---|
| text/plain | string | id of the unshared item |
PUT /items/{id}/unshare
Content-Type: multipart/form-data
Accept: text/plain
Authorization: ...
--------boundaryString
Content-Disposition: form-data; name="users"
user1,user2,user3
--------boundaryString--
...
HTTP/1.1 204 No Content
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e