Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

URLopenspecimen/rest/ng/users/1
MethodPUT
Requestapplication/json
json

{

Code Block
languagejs
linenumberstrue
{
  "site":{"name":"Porder Drive"},
  "collectionProtocol":{"shortTitle":"LCP"},
  "role":{"name":"Technician"}
}
Response 
Code Block
languagejs
themeEclipse
linenumberstrue
{
  "id":null,
null  "role": {
      "id": 44,
      "name": "Technician",
      "description": "User who collects and processes specimens.",
      "parentRoleName":null,
     null "childRoles": [
0][],
      "acl": [
6]0:[
         {
"id": 14
,"resourceName": "StorageContainer"
,"operations": [
1]0:  {
"resourceInstanceId": null
,"operationName": "Read"
}]},
-  -  } -  1:  {
"id": 44
,"resourceName": "ShippingAndTracking",
           "operations": [
4]0:[
             {
"resourceInstanceId": null
,"operationName": "Create"
}
-

1:},
             {
"resourceInstanceId": null
,"operationName": "Update"
}
-

2:},
             {
"resourceInstanceId": null
,"operationName": "Delete"
}
-

3:},
             {
"resourceInstanceId": null
,"operationName": "Read"
}]},
-  -  } -  2:  {
"id": 15
,"resourceName": "CollectionProtocol"
,"operations": [
1]0:  {
"resourceInstanceId": null
,"operationName": "Read"
}]},
-  -  } -  3:  {
"id": 18
,"resourceName": "Order",
            "operations": [
4]0:[
              {
"resourceInstanceId": null
,"operationName": "Read"
}
-

1:  {
},{"resourceInstanceId": null
,"operationName": "Create"
}
-

2:},
              {
"resourceInstanceId": null
,"operationName": "Delete"
}
-

3:  {
},{"resourceInstanceId": null
,"operationName": "Update"
}]}
-,
 -  } -  4:  {
"id": 17
,"resourceName": "VisitAndSpecimen",
          "operations":[
[ 4]0:  { "resourceInstanceId": null "operationName": "Delete" } -  1:  {
"resourceInstanceId": null
,"operationName": "ReadDelete"
}
-,
 2:  { "resourceInstanceId": null "operationName": "Create" } -  3:  {
"resourceInstanceId": null
,"operationName": "UpdateRead"
}
-

-

}
-,
   5:  { "id": 16 "resourceName": "ParticipantDeid" "operations": [ 1]0:  {
"resourceInstanceId": null
,"operationName": "ReadCreate"
},
-  -  } -  -  } -  "collectionProtocol": {
"idresourceInstanceId": 52
"shortTitlenull,"operationName": "LCPUpdate"
"title": "Lung Cancer Protocol"
"code": "LP"
"principalInvestigator": {
}]},
       {"id": 1
"firstName16,"resourceName": "AdminParticipantDeid"
,"lastNameoperations": [{"AdminresourceInstanceId"
:null,"loginNameoperationName": "admin@admin.com"
"domain": "openspecimen"
"emailAddress": "openspecimendemo@gmail.com"
"admin": true
"cpCount": 0
"creationDate": null
}
-

"startDate": 1446661800000
"endDate": null
"participantCount": null
"specimenCount": null
"ppidFmt": "LP-%04d"
"manualPpidEnabled": true
}
-Read"}]}
     ]
   },
   "collectionProtocol":{"id":52,"shortTitle":"LCP","title":"Lung Cancer Protocol","code":"LP"},
   "site": {
"id": 35
,"name": "3165 Porder Drive"
,"instituteName": "Stanford"
,"code": "PD"
,"type": "Collection Site"
"activityStatus": "Active"
"cpCount": 0
"coordinators": [
1]0:  {
"id": 1
"firstName": "Admin"
"lastName": "Admin"
"loginName": "admin@admin.com"
"domain": "openspecimen"
"emailAddress": "openspecimendemo@gmail.com"
"admin": true
"cpCount": 0
"creationDate": null
}
-

-

"address": null
"extensionDetail": null
}
-

"systemRole": },
   "systemRole":false
}

 Error Cases :

code
Applies to
Status Message
200All resourcesUser Role has been updated assigned successfully to user
400All requestsInvalid parameters, e.g  duplicate login name, duplicate email address, blank first name site, cp, role etc
401All requestsAuthorization failed, user doesn’t have authority to assign role
404All requestsUser not found, user with given details not present in the system
500All requestsInternal server error, encountered server error while performing operations

...