Proposed Decapod Calibration Server Architecture
Resources
Request Type |
Response / Action |
Status Code |
---|---|---|
GET |
Redirects to the start page for the Decapod Calibration user interface. |
Success: 301 |
DELETE, POST, PUT |
N/A |
Error: 405 |
GET |
Returns the status of the upload. { numOfStereoImages: # } At Error, { error_code: "BAD_ZIP", msg: "Selected file does not seem to be an archive" } |
Success: 200, Error: 500, or 404 if unpacked directory is not found |
PUT |
Upload the zip file of images for generating the calibration data. Returns the same output as GET request |
Success: 200, Error: 500, or 404 if unpacked directory is not found, or 409 if the calibration is in progress |
DELETE |
Removes all of the images |
Success: 204, Error: 500 or 409 if the calibration is in progress |
POST |
N/A |
Error: 405 |
GET |
Returns the status of the calibration. { status: "in progress" } If the calibration completes, return: { status: "complete", url: "http://localhost:8083/data/calibrate.zip" } At error, { status: "error", } |
Success: 200, Error: 500 |
PUT |
Trigger the calibration action |
Success: 202, Error: 409 |
DELETE |
Removes all calibration data |
Success: 204, Error: 409 |
POST |
N/A |
Error: 405 |
Image Status
Note: The image status are checked in the listed order.
Stauts Code |
Message |
Server returned JSON |
---|---|---|
BAD_ZIP |
Selected file does not seem to be an archive |
{ "statusCode": "BAD_ZIP", "message": "Selected file does not seem to be an archive" } |
NO_STEREO_IMAGES |
Selected archive does not appear to have stereo images |
{ "statusCode": "NO_STEREO_IMAGES", "message": "Selected archive does not appear to have stereo images" } |
NOT_ENOUGH_IMAGES |
No enough calibration images |
{ "statusCode": "NOT_ENOUGH_IMAGES", "requiredStereoImages": #, "DetectedStereoImages": #, "message": "Not enough calibration images are detected: Need 23 stereo images, found 12" } |