...
Summary
This page contains documentation for sharing a specimen-list with other user. A specimen list cannot be shared with self. It has to be shared with other users.
Request Details
Parameter | Details |
---|---|
specimenListId | Identifier of specimen list. |
operation | Can be one of the following. UPDATE , REMOVE , ADD . Using UPDATE will clear off the existing list of shared users and add the new users specified in payload. Using ADD will append the users to existing shared list. Using REMOVE will remove the users mentioned in payload from the existing list. This is optional, if this field is not mentioned, default value is taken as UPDATE. |
Request Payload | Is a list of user-identifiers. |
Result
Response contains summary of users with whom the list is shared in case of UPDATE operation. In case of ADD operation the response is summary of users that have been newly added, similarly in case of REMOVE response is summary of users whose access has been revoked from the specimen list.
URL | http://<host>:<port>/ catissuecore/rest/ng/specimen-lists/{specimenListId}/users?operation=[UPDATE|REMOVE|ADD] |
Method | PUT |
Content-Type | application/json |
Request | [ 17 , 15 ,16 ] |
Response | [ { "id": 17, |
...
"firstName": " |
...
James", |
...
"lastName": " |
...
Smith", |
...
"loginName": " |
...
James.Smith@example.com" |
...
...
}, |
...
{ |
...
"id": 15, |
...
"firstName": " |
...
Lina", |
...
"lastName": " |
...
Morris", |
...
"loginName": " |
...
Lina.Morris@example.com" |
...
...
}, |
...
{ |
...
"id": 16, |
...
"firstName": " |
...
Tim", |
...
"lastName": " |
...
Jones", |
...
"loginName": " |
...
Tim.Jones@example.com" |
...
...
} ] |
Error Cases
code | Applies to | Status Message |
---|---|---|
200 | All resources | Share settings for given specimen list have been applied successfully. |
400 | All requests | Invalid parameters, e.g Invalid User-ids, Invalid specimenListid. |
401 | All requests | Authorization failed, User doesn’t have Authority. |
500 | All requests | Internal server error, Encountered server error while performing operations. |