Versions Compared

Key

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

...

openspecimen/rest/ng/users?start={start}&max={maxResults}&searchString={searchString}&countReq={maxResultstrue/false}

Use this resource to get users. This API returns all the users present in the openSpecimen application.

...

Below are the attributes which need to be sent in the request body:

Parameter
Details
searchStringThe value with which you want to search the User. The given value will be matched with First Name, Last Name, Login Name, Email Address, Identifier.
startstart index of the results
maxResultsMaximum number of records to fetch. By default it will be 1000

http[s]:<host>:<port>/openspecimen/rest/ng/users

...

50
countReqSet this parameter to true, if want to get the total count of matching results.


http[s]:<host>:<port>/openspecimen/rest/ng/users?maxResults={maxResults}

 

Use this URL to get users in openSpecimen application.

...

URLhttp://<host>:<port>/openspecimen/rest/ng/users?searchString=Piterson
MethodGET
Requestapplication/json

Response

[{

    "id" : "1",
    "lastName":"Piterson",
    "firstName":"Sam",
    "loginName":"samPiterson"

},{

    "id" : "2",

    "lastName":"Mike",

    "firstName":"Hussey",

    "loginName":"mikeHussey"

}]

 

 

Error Cases :

code
Applies to
Status Message
200All resourcesUsers got successfully
401All requestsAuthorization failed, user doesn’t have authority
500All requestsInternal server error, encountered server error while performing operations