{"openapi":"3.0.1","info":{"title":"Ambidextrous Kitting Controller API","description":"This document describes the Ambidextrous API for controlling a kitting line.","version":"1.0.0"},"paths":{"/api/clear_all":{"delete":{"tags":["Global Configuration"],"summary":"Delete all kits, items, and jobs.","responses":{"200":{"description":"The deletion succeeded."}}}},"/api/kits":{"get":{"tags":["Kit Configuration"],"summary":"Get a subset of kits available on the system.","parameters":[{"in":"query","name":"search","required":false,"schema":{"type":"string"},"description":"A query that matches kit names."},{"in":"query","name":"from_index","required":false,"schema":{"type":"integer","minimum":1},"description":"The starting index, from the most-recently-updated kit. Only kits beyond this index (inclusive) are returned."},{"in":"query","name":"to_index","required":false,"schema":{"type":"integer","minimum":1},"description":"The final index, from the most-recently-updated kit. Only kits up to this index (exclusive) are returned."},{"in":"query","name":"from_time","required":false,"schema":{"type":"string","format":"date-time"},"description":"The starting time. Only kits updated later than this time are returned."},{"in":"query","name":"to_time","required":false,"schema":{"type":"string","format":"date-time"},"description":"The ending time. Only kits updated earlier than this time are returned."}],"responses":{"200":{"description":"A JSON array containing all kits that matched the query.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kit"}}}}}}},"post":{"tags":["Kit Configuration"],"summary":"Create a new kit.","requestBody":{"description":"The basic details of the kit.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitCreation"}}}},"responses":{"201":{"description":"The created kit, including its ID.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kit"}}}}}}}},"/api/kits/{id}":{"get":{"tags":["Kit Configuration"],"summary":"Get the detail of a kit available on the system.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."}],"responses":{"200":{"description":"A JSON description of the kit matching the query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitDetail"}}}},"404":{"description":"The kit ID was not found."}}},"put":{"tags":["Kit Configuration"],"summary":"Update an existing kit.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."}],"requestBody":{"description":"The basic details of the kit.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitCreation"}}}},"responses":{"200":{"description":"The updated kit, including its ID.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Kit"}}}}},"400":{"description":"Something was wrong with the kit description."},"404":{"description":"The kit is not found."}}},"delete":{"tags":["Kit Configuration"],"summary":"Delete a kit.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."}],"responses":{"200":{"description":"The deletion succeeded."},"400":{"description":"The kit was in use in a job and cannot be deleted."},"404":{"description":"The kit is not found."}}}},"/api/kits/{id}/items":{"get":{"tags":["Kit Configuration"],"summary":"Get the line items of a kit.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."}],"responses":{"200":{"description":"A JSON description of the line items in the kit.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KitLineItem"}}}}},"404":{"description":"The kit ID was not found."}}},"post":{"tags":["Kit Configuration"],"summary":"Add a new item to a kit.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."}],"requestBody":{"description":"The item and quantity to add.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item_id":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int64"}}}}}},"responses":{"200":{"description":"The updated kit, including its ID.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KitDetail"}}}}},"400":{"description":"Something was wrong with the item specification."},"404":{"description":"The kit is not found or the item wasn't found."}}}},"/api/kits/{id}/items/{item_id}":{"put":{"tags":["Kit Configuration"],"summary":"Update the quantity of a line item in a kit.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The item ID."}],"requestBody":{"description":"The updated item quantity.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"integer","format":"int64"}}}}}},"responses":{"200":{"description":"The update succeeded."},"400":{"description":"There was a problem with the request."},"404":{"description":"The kit is not found or the item is not in the kit."}}},"delete":{"tags":["Kit Configuration"],"summary":"Delete a line item from a kit.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The item ID."}],"responses":{"200":{"description":"The deletion succeeded."},"400":{"description":"The kit was in use in a job and cannot be deleted."},"404":{"description":"The kit is not found or the item is not in the kit."}}}},"/api/items":{"get":{"tags":["Item Configuration"],"summary":"Get a subset of items available on the system.","parameters":[{"in":"query","name":"search","required":false,"schema":{"type":"string"},"description":"A query that matches item names."}],"responses":{"200":{"description":"A JSON array containing all items that matched the query.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}}}}}},"post":{"tags":["Item Configuration"],"summary":"Create a new item.","requestBody":{"description":"The basic details of the item.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemCreation"}}}},"responses":{"201":{"description":"The created item, including its ID.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}}}}}}},"/api/items/{id}":{"get":{"tags":["Item Configuration"],"summary":"Get the detail of an item available on the system.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The item ID."}],"responses":{"200":{"description":"A JSON description of the item matching the query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"404":{"description":"The item ID was not found."}}},"put":{"tags":["Item Configuration"],"summary":"Update an existing item.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The item ID."}],"requestBody":{"description":"The basic details of the item.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemCreation"}}}},"responses":{"200":{"description":"The updated item, including its ID.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Item"}}}}},"400":{"description":"Something was wrong with the item description."},"404":{"description":"The item is not found."}}},"delete":{"tags":["Item Configuration"],"summary":"Delete an item.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The item ID."}],"responses":{"200":{"description":"The deletion succeeded."},"400":{"description":"The item was in use in a kit and cannot be deleted."},"404":{"description":"The item is not found."}}}},"/api/jobs":{"get":{"tags":["Job Configuration"],"summary":"Get a subset of jobs available on the system.","parameters":[{"in":"query","name":"search","required":false,"schema":{"type":"string"},"description":"A query that matches job names."},{"in":"query","name":"from_index","required":false,"schema":{"type":"integer","minimum":1},"description":"The starting index, from the most-recently-updated kit. Only kits beyond this index (inclusive) are returned."},{"in":"query","name":"to_index","required":false,"schema":{"type":"integer","minimum":1},"description":"The final index, from the most-recently-updated kit. Only kits up to this index (exclusive) are returned."},{"in":"query","name":"from_time","required":false,"schema":{"type":"string","format":"date-time"},"description":"The starting time. Only kits updated later than this time are returned."},{"in":"query","name":"to_time","required":false,"schema":{"type":"string","format":"date-time"},"description":"The ending time. Only kits updated earlier than this time are returned."}],"responses":{"200":{"description":"A JSON array containing all jobs that matched the query.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}}}}}},"post":{"tags":["Job Configuration"],"summary":"Create a new job.","requestBody":{"description":"The basic details of the job.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreation"}}}},"responses":{"201":{"description":"The created job, including its ID.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}}}}}}},"/api/jobs/{id}":{"get":{"tags":["Job Configuration"],"summary":"Get the detail of an job available on the system.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The job ID."}],"responses":{"200":{"description":"A JSON description of the job matching the query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetail"}}}},"404":{"description":"The job ID was not found."}}},"put":{"tags":["Job Configuration"],"summary":"Update an existing job.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The job ID."}],"requestBody":{"description":"The basic details of the job.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreation"}}}},"responses":{"200":{"description":"The updated job, including its ID.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}}}},"400":{"description":"Something was wrong with the job description."},"404":{"description":"The job is not found."}}},"delete":{"tags":["Job Configuration"],"summary":"Delete a job.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The job ID."}],"responses":{"200":{"description":"The deletion succeeded."},"404":{"description":"The job is not found."}}}},"/api/jobs/{id}/kits":{"get":{"tags":["Job Configuration"],"summary":"Get the kits in a job.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The job ID."}],"responses":{"200":{"description":"A JSON description of the kits in the job.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobLineItem"}}}}},"404":{"description":"The job ID was not found."}}},"post":{"tags":["Job Configuration"],"summary":"Add a new kit to the job.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The job ID."}],"requestBody":{"description":"The kit and quantity to add.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kit_id":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int64"}}}}}},"responses":{"200":{"description":"The updated job, including its ID.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobDetail"}}}}},"400":{"description":"Something was wrong with the kit specification."},"404":{"description":"The job wasn't found or the kit wasn't found."}}}},"/api/jobs/{id}/kits/{kit_id}":{"put":{"tags":["Job Configuration"],"summary":"Update the quantity of a kit in a job.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The job ID."},{"in":"path","name":"kit_id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."}],"requestBody":{"description":"The updated kit quantity.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"integer","format":"int64"}}}}}},"responses":{"200":{"description":"The update succeeded."},"400":{"description":"There was a problem with the request."},"404":{"description":"The job wasn't found or the kit is not in the job."}}},"delete":{"tags":["Job Configuration"],"summary":"Delete a kit from a job.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The job ID."},{"in":"path","name":"kit_id","required":true,"schema":{"type":"integer","format":"int64"},"description":"The kit ID."}],"responses":{"200":{"description":"The deletion succeeded."},"404":{"description":"The kit is not found or the item is not in the kit."}}}},"/api/active_job":{"get":{"tags":["System Control"],"summary":"Get the active job for the system.","responses":{"200":{"description":"The active job details.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobDetail"}}}}},"404":{"description":"No job was currently active."}}},"post":{"tags":["System Control"],"summary":"Set the active job for the system.","requestBody":{"description":"The ID of the job to set as the active job.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64"}}}}}},"responses":{"200":{"description":"The active job was set."},"400":{"description":"The active job could not be set because the system was already working."},"404":{"description":"The job ID was not found."}}},"delete":{"tags":["System Control"],"summary":"Cancel the active job for the system.","responses":{"200":{"description":"The active job was cancelled."},"400":{"description":"The active job could not be cancelled because the system was working."},"404":{"description":"There was no active job to cancel."}}}},"/api/start":{"post":{"tags":["System Control"],"summary":"Run or resume the active job.","responses":{"202":{"description":"The run was launched."},"400":{"description":"The active job was not set."}}}},"/api/home":{"post":{"tags":["System Control"],"summary":"Pause the active job and go home.","responses":{"202":{"description":"Homing was initiated."},"400":{"description":"The system could not be homed."}}}},"/api/calib_cameras/{robot_id}":{"post":{"tags":["Service"],"summary":"Calibrate one robot's cameras.","parameters":[{"in":"path","name":"robot_id","required":true,"schema":{"type":"string"},"description":"The robot ID."}],"responses":{"200":{"description":"Camera calibration was initiated.","content":{"application/json":{"schema":{"type":"number","description":"A unique id associated with this calibration."}}}},"400":{"description":"The system could not run camera calibration."}}}},"/api/calib_state/{calib_id}":{"get":{"tags":["Service"],"summary":"Get the state of the calibration.","parameters":[{"in":"path","name":"calib_id","required":true,"schema":{"type":"string"},"description":"The calibration id."}],"responses":{"200":{"description":"The calibration state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibInfo"}}}}}}},"/api/calib_suction/{robot_id}":{"post":{"tags":["Service"],"summary":"Calibrate one robot's suction system.","parameters":[{"in":"path","name":"robot_id","required":true,"schema":{"type":"string"},"description":"The robot ID."}],"responses":{"200":{"description":"Suction calibration was initiated."},"400":{"description":"The system could not run suction calibration."}}}},"/api/error_handler/{error_id}":{"get":{"tags":["Service"],"summary":"Gets the error handling wizard","parameters":[{"in":"path","name":"error_id","required":true,"schema":{"type":"number"},"description":"The error code for which the wizard is requested."}],"responses":{"200":{"description":"The error wizard.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorHandlerWizard"}}}}}}},"/api/main/login":{"post":{"tags":["Login"],"summary":"Logs in the user.","requestBody":{"description":"The login details.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInfo"}}}},"responses":{"202":{"description":"Login was successful."},"400":{"description":"The system could not login."}}}},"/api/status":{"get":{"tags":["System Monitoring"],"summary":"Get the kitting system's active status.","responses":{"200":{"description":"The full system status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}},"404":{"description":"The robot was disconnected and could not be reached."}}}},"/api/system_health":{"get":{"tags":["System Monitoring"],"summary":"Get the kitting system's real-time system health.","responses":{"200":{"description":"The full system health status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemHealthMetrics"}}}},"404":{"description":"The robot was disconnected and could not be reached."}}}},"/api/about":{"get":{"tags":["System Monitoring"],"summary":"Get relevant information about the system (version number, etc).","responses":{"200":{"description":"The About information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutInfo"}}}},"404":{"description":"The robot was disconnected and could not be reached."}}}},"/api/get_image":{"get":{"tags":["System Monitoring"],"summary":"Get the image given the item ID.","responses":{"200":{"description":"The image to display."},"404":{"description":"Unable to find the image on the server."}}}},"/api/diagnostics/{robot_id}":{"post":{"tags":["Diagnostics"],"summary":"Send the request for robot diagnostics.","parameters":[{"in":"path","name":"robot_id","required":true,"schema":{"type":"string"},"description":"The robot id."}],"responses":{"200":{"description":"The message was acknowledged."},"404":{"description":"The message was no longer active."}}},"get":{"tags":["Diagnostics"],"summary":"Get the robot diagnostics.","parameters":[{"in":"path","name":"robot_id","required":true,"schema":{"type":"string"},"description":"The robot id."}],"responses":{"200":{"description":"The full robot diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RobotDiagnostics"}}}}}}},"/api/diagnostics/get_diagnostic_images/{robot_id}":{"get":{"tags":["Diagnostics"],"summary":"Get the full res images for the given cell.","parameters":[{"in":"path","name":"robot_id","required":true,"schema":{"type":"string"},"description":"The robot id."}],"responses":{"200":{"description":"The full res images for the given cell.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionSensorDiagnostics"}}}}}}},"/api/diagnostics/conveyor":{"post":{"tags":["Diagnostics"],"summary":"Send the request for conveyor diagnostics.","parameters":[{"in":"query","name":"num_cleats","required":true,"schema":{"type":"number"},"description":"The number of cleats to move the conveyor by."}],"responses":{"200":{"description":"The message was acknowledged."},"404":{"description":"The message was no longer active."}}},"get":{"tags":["Diagnostics"],"summary":"Get the conveyor diagnostics.","responses":{"200":{"description":"The conveyor diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConveyorDiagnostics"}}}}}}},"/api/diagnostics/sweeper":{"post":{"tags":["Diagnostics"],"summary":"Send the request for sweeper diagnostics.","responses":{"200":{"description":"The message was acknowledged."},"404":{"description":"The message was no longer active."}}},"get":{"tags":["Diagnostics"],"summary":"Get the sweeper diagnostics.","responses":{"200":{"description":"The sweeper diagnostics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweeperDiagnostics"}}}}}}},"/api/confirm":{"post":{"tags":["System Control"],"summary":"Acknowledge the system's current message.","parameters":[{"in":"query","name":"id","required":true,"schema":{"type":"string"},"description":"The message ID to acknowledge."}],"responses":{"200":{"description":"The message was acknowledged."},"404":{"description":"The message was no longer active."}}}},"/api/single_packer_mode/{mode}":{"post":{"tags":["System Control"],"summary":"Put the system in single packer mode.","parameters":[{"in":"path","name":"mode","required":true,"schema":{"type":"number"},"description":"Whether to set the system in single packer mode or not."}],"responses":{"200":{"description":"The message was acknowledged."},"404":{"description":"Error handling the mode setting."}}}},"/api/metrics":{"get":{"tags":["Metrics"],"summary":"Get the system's metrics.","parameters":[{"in":"query","name":"robot_id","required":false,"schema":{"type":"string"},"description":"The robot id."},{"in":"query","name":"start_time","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only get metrics past this time."},{"in":"query","name":"end_time","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only get metrics before this time."}],"responses":{"200":{"description":"The metrics in the given time window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metrics"}}}}}}},"/api/loader/status/{robot_id}":{"get":{"tags":["Loader UI"],"summary":"Gets the status on the loader screen.","parameters":[{"in":"path","name":"robot_id","required":true,"schema":{"type":"string"},"description":"The robot ID."}],"responses":{"200":{"description":"The status of the system.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadingStatus"}}}}}}},"/api/loader/confirm_pause/{robot_id}":{"post":{"tags":["Loader UI"],"summary":"Sends the confirm button state.","parameters":[{"in":"path","name":"robot_id","required":true,"schema":{"type":"string"},"description":"The robot ID."}],"responses":{"202":{"description":"Confirm button state sent."},"400":{"description":"Confirm button state could not be sent."}}}},"/api/loader/confirm_resume/{robot_id}":{"post":{"tags":["Loader UI"],"summary":"Sends the resume button state.","parameters":[{"in":"path","name":"robot_id","required":true,"schema":{"type":"string"},"description":"The robot ID."}],"responses":{"202":{"description":"Resume button state sent."},"400":{"description":"Resume button state could not be sent."}}}},"/api/packer/status/{packer_id}":{"get":{"tags":["Packer UI"],"summary":"Gets the status on the packer screen.","parameters":[{"in":"path","name":"packer_id","required":true,"schema":{"type":"string","description":"The packer UI's ID."}}],"responses":{"200":{"description":"The state of the system.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackingStatus"}}}}}}},"/api/packer/confirm_complete/{packer_id}":{"put":{"tags":["Packer UI"],"summary":"Sends the confirm button push signal.","parameters":[{"in":"path","name":"packer_id","required":true,"schema":{"type":"string"},"description":"The packer UI's ID."}],"responses":{"200":{"description":"The button push succeeded."},"400":{"description":"There was a problem with the request."}}}},"/api/packer/under_pick/{packer_id}":{"put":{"tags":["Packer UI"],"summary":"Sends the under pick button push signal.","parameters":[{"in":"path","name":"packer_id","required":true,"schema":{"type":"string"},"description":"The packer UI's ID."}],"responses":{"200":{"description":"The under pick button succeeded."},"400":{"description":"There was a problem with the request."}}}},"/api/packer/over_pick/{packer_id}":{"put":{"tags":["Packer UI"],"summary":"Sends the over pick button push signal.","parameters":[{"in":"path","name":"packer_id","required":true,"schema":{"type":"string"},"description":"The packer UI's ID."}],"responses":{"200":{"description":"The over pick button succeeded."},"400":{"description":"There was a problem with the request."}}}}},"components":{"schemas":{"Kit":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"The UUID for the kit."},"name":{"type":"string","description":"A name for the kit."},"description":{"type":"string","description":"A human-readable description of the kit"},"last_modified_at":{"type":"string","format":"date-time","description":"The last time the kit was modified."}}},"Item":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"mass":{"type":"number","format":"float64"},"dimensions":{"type":"array","items":{"type":"number","format":"float64"},"minItems":3,"maxItems":3},"pickable":{"type":"boolean"},"bagged":{"type":"boolean"}}},"Job":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"completed":{"type":"boolean"},"priority":{"type":"integer"}}},"KitItem":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"kit_id":{"type":"integer","format":"int64"},"item_id":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int64"}}},"JobKit":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"job_id":{"type":"integer","format":"int64"},"kit_id":{"type":"integer","format":"int64"},"quantity_requested":{"type":"integer","format":"int64"},"quantity_filled":{"type":"integer","format":"int64"}}},"KitDetail":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"last_modified_at":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"integer","format":"int64"}}}}}},"JobDetail":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"completed":{"type":"boolean"},"priority":{"type":"integer"},"kits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"quantity_requested":{"type":"integer","format":"int64"},"quantity_filled":{"type":"integer","format":"int64"}}}}}},"KitLineItem":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"integer","format":"int64"}}},"JobLineItem":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"quantity_requested":{"type":"integer","format":"int64"},"quatnity_filled":{"type":"integer","format":"int64"}}},"KitCreation":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}},"ItemCreation":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"mass":{"type":"number","format":"float64"},"dimensions":{"type":"array","items":{"type":"number","format":"float64"},"minItems":3,"maxItems":3},"pickable":{"type":"boolean"},"bagged":{"type":"boolean"}}},"JobCreation":{"type":"object","properties":{"priority":{"type":"integer"}}},"KitStatus":{"type":"object","properties":{"name":{"type":"string","description":"Name of the kit."},"status":{"type":"string","enum":["ACTIVE","PENDING","CANCELED"],"description":"The state of the kit."},"quantity":{"type":"number","description":"The number of kits of this type."},"done":{"type":"number","description":"The doneness of this kit."},"time_remaining":{"type":"number","description":"The time remaining to complete this kit."}}},"Status":{"type":"object","properties":{"state":{"type":"string","enum":["BOOT","IDLE","RUNNING","PAUSED","OUTPUT_CYCLE","OUTPUT_CLEAR","DIAGNOSTICS","E_STOP","ERROR"]},"current_cmd":{"type":"object","properties":{"msg":{"type":"string","description":"The message to display."},"confirm_msg":{"type":"string","description":"Confirmation message."},"input_of_interest":{"type":"string","description":"The input container of interest."},"robot_of_interest":{"type":"string","description":"The robot of interest."},"outputs_of_intrest":{"type":"array","items":{"type":"string","description":"The output containers of interest."}}}},"cell_states":{"type":"array","items":{"type":"string","enum":["BOOT","IDLE","OPTIM","ASSIGN","CHANGEOVER","RUNNING","ERROR","PAUSED","E_STOP","OUTPUT_CYCLE","OUTPUT_CLEAR","RECOVERY","DIAGNOSTICS","CALIB_CAMERAS","CALIB_SUCTION"],"description":"The current state of the kitting cell's operation."}},"active_job":{"$ref":"#/components/schemas/JobDetail"},"job_done_percentage":{"type":"number","description":"The percentage of the job done."},"error_code":{"type":"integer","description":"The error code for the system."},"error_msg":{"type":"string","description":"The error message for this robot."},"packing_cell_states":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the packer cell."},"is_used":{"type":"boolean","description":"If this cell is being used."},"pack_confirmed":{"type":"boolean","description":"If the packer has confirmed finishing packing."},"num_rejected_kits":{"type":"number","description":"Number of rejected kits."},"packer_status_msg":{"type":"string","description":"Message for the packer."}}}},"packing_state":{"type":"object","properties":{"is_packing_complete":{"type":"boolean","description":"True if both packers have completed packing."},"total_rejected_kits":{"description":"Total number of rejected kits."}}},"sweeper_state":{"type":"number","description":"The position of the sweeper."}}},"TimeSeriesDataPoint":{"type":"object","properties":{"data_type":{"type":"string","enum":["KIT_THROUGHPUT","PICK_THROUGHPUT"]},"time":{"type":"number","description":"Time value."},"data":{"type":"number","description":"Data value."}}},"Metrics":{"type":"object","properties":{"time_active":{"type":"number","description":"The total time spent kitting, in seconds."},"time_idle":{"type":"number","description":"The total time spent idle between jobs."},"time_waiting":{"type":"number","description":"The total time spent idle waiting on human intervention."},"time_in_error":{"type":"number","description":"The total time spent in an error state."},"uptime":{"type":"number","description":"The uptime of the system as a fraction."},"throughput":{"type":"number","description":"The number of items cycled per hour."},"kit_througput":{"type":"number","description":"The number of kits completed per hour."},"n_items":{"type":"number","description":"The number of items sorted."},"n_kits":{"type":"number","description":"The number of kits completed."},"n_drops":{"type":"number","description":"The number of items dropped."},"pick_success_rate":{"type":"number","description":"The overall pick success rate during this time."},"time_series_data":{"type":"array","items":{"type":"object","description":"Rolling time series graph.","properties":{"schema":{"$ref":"#/components/schemas/TimeSeriesDataPoint"}}}}}},"LoadingStatus":{"type":"object","description":"Status object for the loader UI","properties":{"cell_state":{"type":"string","enum":["LOAD","READY","START","PICK","PLACE","DONE","CHANGEOVER","RECOVERY","REPLEN","PROTECTIVE_STOP","CALIB_CAMERAS","CALIB_SUCTION","DIAGNOSTICS"],"description":"An enum depicting the state the cell is in."},"message":{"type":"string","description":"Message to be displayed on the screen."},"id":{"type":"number","description":"Unique id of the cell."},"input_container_states":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID for this input container."},"current_item":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/Item"}}},"next_item":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/Item"}}},"bin_state":{"type":"string","enum":["INACTIVE","ACTIVE","REPLEN","CHANGEOVER","EMPTY"],"description":"An enum representing the state of the bin."},"needs_attention":{"type":"boolean","description":"A bit to indicate if it is the bin for the loader's attention."},"fill_percentage":{"type":"number","description":"The fill level of the bin."},"cycles_until_changeover_blocking":{"type":"integer","description":"The number of cycles until changeover will block this cell from proceeding."}}}}}},"ImagePickablityObject":{"type":"object","description":"An object that assosciates an image with its SKU attributes.","properties":{"image":{"type":"string","description":"An image of the item."},"description":{"type":"string","description":"The name of the item."},"sku":{"type":"string","description":"The barcode of the item."},"pickable":{"type":"boolean","description":"Whether the item is pickable or not."}}},"PackingStatus":{"type":"object","description":"Status object for the packer UI.","properties":{"packer_id":{"type":"string","description":"The packer ID."},"active_packer":{"type":"boolean","description":"Bit that maintains if the packer is being used."},"packing_done":{"type":"boolean","description":"Bit that indicates if the packer has completed the task."},"sweeper_position":{"type":"boolean","description":"The location of the sweeper."},"current_kit_sku":{"type":"string","description":"Kit SKU."},"kits":{"type":"array","items":{"type":"object","properties":{"quantity_requested":{"type":"number","description":"The number of kits requested."},"quantity_filled":{"type":"number","description":"The number of kits filled."},"quantity_rejected":{"type":"number","description":"The number of kits rejected."}}}},"item_images":{"type":"array","items":{"type":"object","properties":{"image":{"type":"object","description":"The item image."}}}},"message":{"type":"string","description":"Message."},"state":{"type":"string","enum":["IDLE","PACKING","CHANGEOVER"],"description":"An enum that describes the state of the packer."}}},"CupPressureTuple":{"type":"object","description":"Tuple associating a cup with pressure.","properties":{"cup":{"type":"number","description":"The cup id."},"pressure":{"type":"number","description":"The pressure."}}},"VisionSensorDiagnostics":{"type":"object","description":"Sensor images.","properties":{"image_color":{"type":"object","description":"The color image."},"image_depth":{"type":"object","description":"The depth image."},"id":{"type":"string","description":"Sensor id."}}},"RobotDiagnostics":{"type":"object","description":"Diagnostics object for the robot's sensors.","properties":{"sensor_images_color":{"type":"array","items":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/VisionSensorDiagnostics"}}}},"cup_pressures":{"type":"array","items":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/CupPressureTuple"}}}}}},"ConveyorDiagnostics":{"type":"object","description":"Diagnostics object for the conveyor.","properties":{"position":{"type":"number","description":"The conveyor's current position."}}},"SweeperDiagnostics":{"type":"object","description":"Diagnostics object for the sweeper.","properties":{"position":{"type":"number","description":"The sweeper position."}}},"ErrorHandlerWizard":{"type":"object","description":"Wizard to guide the user out of an error state.","properties":{"images":{"type":"array","items":{"type":"object","description":"Helpful images."}},"messages":{"type":"array","items":{"type":"string","description":"Help messages."}}}},"WarningObject":{"type":"object","description":"Object that encapsulates a warning event.","properties":{"image":{"type":"object","description":"Helpful image."},"message":{"type":"string","description":"Warning message"},"level":{"type":"number","description":"The severity of the warning."}}},"SystemHealthMetrics":{"type":"object","description":"System health object.","properties":{"warning_objects":{"type":"array","items":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/WarningObject"}}}}}},"LoginInfo":{"type":"object","description":"Login info.","properties":{"uname":{"type":"string","description":"User name."},"password":{"type":"string","description":"Password."}}},"AboutInfo":{"type":"object","description":"About info.","properties":{"version":{"type":"string","description":"The version info."},"copyright":{"type":"string","description":"Copyright info."}}},"CalibInfo":{"type":"object","description":"Runtime calibration info.","properties":{"id":{"type":"number","description":"The id associated with this calibration."},"is_done":{"type":"boolean","description":"Whether the calibration has completed."},"doneness":{"type":"number","description":"Percentage of the calibration completed."},"last_calib":{"type":"object","description":"The last date of successful calibration."}}}}}}