D4Science D4Science Don't have a D4Science account? Create one Could not find what you are looking for? Contact us.

ItemSharing Resource

POST /items/{id}/share

Request Parameters
name type description
defaultAccessType form
mapUserPermission form
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
id path
Request Body
media type data type
application/x-www-form-urlencoded (custom)
Response Body
media type data type description
application/json string (JSON)

Example

Request
POST /items/{id}/share
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

PUT /items/{id}/share

Request Parameters
name type description constraints multivalued
accessType formdata "ADMINISTRATOR" or "READ_ONLY" or "WRITE_ALL" or "WRITE_OWNER" no
users formdata   yes
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources   no
id path   no
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json string (JSON)

Example

Request
PUT /items/{id}/share
Content-Type: multipart/form-data
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

PUT /items/{id}/unshare

Request Parameters
name type description multivalued
users formdata yes
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources no
id path no
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json string (JSON)

Example

Request
PUT /items/{id}/unshare
Content-Type: multipart/form-data
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...