...
openspecimen/rest/ng/users?start={start}&max={maxResults={maxResults}&searchString={searchString}&name={name}&loginName={loginName}&institute={institute}&activityStatus={activityStatus}&site={siteName}
Use this resource to get users. This API returns all the matching users based on the searchString, if searchString not specified then it returns all the users present in the openSpecimen application. User can also specify the search string which will be used to match the values.
Use HTTP GET method to call this API by passing the below details in JSON format.
Below are the attributes which need to be sent in the request body:
Parameter | Details |
---|---|
start [optional] | start index of the results |
maxResults [optional] | Maximum number of records to fetch. By default it will be 100050 |
...
searchString [ |
...
optional] | The value with which you want to search the User. The given value will be matched with First Name, Last Name, Login Name, Email Address. |
name | The value given will be matched with First Name, and Last name of the user |
loginName | The given value will be matched with loginName of the user |
institute | Result contains the users which belongs to given institute |
activityStatus | Result contains the users which have given activityStatus |
site | Site name, result contains users which belongs to given institute |
http[s]:<host>:<port>/openspecimen/rest/ng/users?maxResults={maxResults}
Use this URL to get users in openSpecimen application.
...
URL | http://<host>:<port>/openspecimen /rest/ng/users?searchString=admin | ||||||||||
Method | GET | ||||||||||
Request | application/json | ||||||||||
Response |
"firstName":"Sam", "loginName":"samPiterson" },{ "id" : "2", "lastName":"Mike", "firstName":"Hussey", "loginName":"mikeHussey" }]
|
...
|
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Users got successfully |
401 | All requests | Authorization failed, user doesn’t have authority |
500 | All requests | Internal server error, encountered server error while performing operations |
...