Versions Compared

Key

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

...

URL/api/samples/
DescriptionAdd sample data to mongoDB
MethodPOST
Url Param
Request Body Data

A json format data
{
"sample": {
"description": "test",
"image_url": "url",
"uploader": "uploader",
"sample_id": "0000",
"sample_type": "BS",
"infant_id": "00"
}
}

Response
  • {message: "Sample data recorded!"} - 200
  • {message: "Bad reques"} - 400
  • {message: "invalid credential(s) provided, please check your credential(s) and try again"} - 400/401


URL/api/mobile-samples/
DescriptionGet user's sample data from mobile database
MethodGET
Url Param


Response
  • {message: "Internal Error, please try again"} - 500


URL/api/samples/image/<barcode_id>
DescriptionGet sample image to mongoDB
MethodGET
Url Param barcode_id
Request Body Data
Response
    • {message: "Bad barcode id"} -400
    • {message: "Bad Request"} - 400
    • {message: "No image data found for barcode {barcode_id}"} - 404
    • {message: "No sample found for barcode {barcode_id}"} - 404
    • image - 200

...