Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

OpenSpecimen v2.0 exposes REST APIs that can be consumed to developed custom interfaces and and for integration with other databases. The REST APIs will be consumed by the OpenSpecimen v2.0 User Interface.

Common Characteristics of REST Resources

The following characteristics apply to all OpenSpecimen API resources:

  • You access a resource by sending an HTTP request to the OpenSpecimen server. The server replies with a response that either contains the data you requested or a status indicator, and in some cases both.
  • All resources are located at http[s]://<host-name>:<port>/catissuecore/rest.
  • You request a particular resource by appending a particular path to this base URL
  • All resources may return any of the below mentioned status codes:
codeApplies toStatus Message
200All resources
201All POST/PUT requestsResource created/updated successfully
400All requestsInvalid parameters, this will also includes application specific error messages
401All requestsAuthorization failed
403All requests
404All requestsResource not found, also includes specified resource id/name/title
500All requestsInternal server error

On this page, when a portion of a URL, path, or parameter value is shown in italics, it indicates that you should replace the italicized value with a particular value appropriate to your request.

Authentication

OpenSpecimen REST API's are signed requests, accessible to all the users who has access to OpenSpecimen application. To access the REST API's user need to pass their OpenSpecimen credentials by setting them in request Authorization header. The username/password should be encoded in base 64 encoding scheme.

Unauthenticated APIs

Given below is list of APIs that do not require user authentication

HTTP MethodURIDescriptionWhy?
GET/institutesRetrieve list of institutes provisioned in databaseTo populate institute dropdown in user sign-up UI form
GET/institutes/bynameRetrieve details of institute by name. Details include, for example, list of departmentsTo populate departments dropdown in user sign-up UI form
GET/config-settings/localeRetrieve locale settings like locale (en-US, en-UK), date/time format in useTo initialise UI app resource bundle
GET/config-settings/app-propsRetrieve details like list of installed plugins, build version, build date etcTo load and initialise plugin resources, and display build information
GET/auth-domainsRetrieve list of authentication domains provisioned in databaseTo populate domain dropdown in user sign-in UI form. The dropdown is displayed iff more than one authentication domains are configured
POST/sessionsAuthenticate user credentials and obtain token for use in subsequent rendezvous with OpenSpecimenUsed in implementation of sign-in UI form.
POST/users/reset-passwordReset user password based on login name and valid reset token issued by OpenSpecimenUsed in implementation of forget password and reset password UI workflow
POST/users/forgot-passwordValidates user login name and sends reset password link to user email IDUsed in implementation of forget password UI workflow
POST/users/sign-upCreate a new user in pending status. The user has to be approved by admin to allow further use of OpenSpecimenUsed in implementation of sign-up UI workflow 

Modules




  • No labels