/
Verification of Configuration
Got feedback or spotted a mistake?

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

Verification of Configuration

To verify the configuration, run the following APIs using cURL or any HTTP client of your choice. These APIs are invoked by OpenSpecimen to retrieve specimens from the freezer.

 

Login:

As the first step, OpenSpecimen authenticates with the freezer and obtains a token to invoke other freezer APIs.

POST <freezer_url>/ws/auth/token Content-Type: x-www-form-urlencoded Accept: application/json Body: grant_type=password&username=<username>&password=<password>

cURL command line:

curl -X POST "<freezer_url>/ws/auth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Accept: application/json" \ -d "grant_type=password&username=<username>&password=<password>"

In response to the above request, you should receive a JSON with token

Retrieve Specimens

Once the token is obtained, it can be used to place an order with the freezer to retrieve one or more specimens

POST <freezer_url>/ws/orders/requests Content-Type: application/json Accept: application/json Authorization: Bearer <token> Body: { "requestScan": "True", "minimumAvailablePercentToStart": 100, "description": "Pick order for OpenSpecimen store list: 17", "type": "Output", "items": [ { "id": "FS90404776", "type": "Sample" } ], "autoStart": "False" }

cURL command line

curl -X POST "<freezer_url>/ws/orders/requests" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -H "Authorization: Bearer <token>" \ -d '{ "requestScan": "True", "minimumAvailablePercentToStart": 100, "description": "Pick order for OpenSpecimen store list: 17", "type": "Output", "items": [ { "id": "FS90404776", "type": "Sample" } ], "autoStart": "False" }'

Related content

Got feedback or spotted a mistake?

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