openspecimen/rest/ng/users
or
openspecimen/rest/ng/users?start={start}&max={maxResults}&searchString={searchString}&countReq={true/false}
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.
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 |
---|---|
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. |
start [optional] | start index of the results |
maxResults [optional] | Maximum number of records to fetch. By default it will be 50 |
countReq [optional] | Set this parameter to true, if want to get the total count of matching results. |
http[s]:<host>:<port>/openspecimen/rest/ng/users
Use this URL to get users in openSpecimen application.
Result:
The response of this request will contains the details of the users.
Below is the example of the get users:
URL | http://<host>:<port>/openspecimen /rest/ng/users?searchString=Piterson |
Method | GET |
Request | application/json |
Response | [{ "id" : "1", }]
|
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 |