{"openapi":"3.0.0","servers":[],"info":{"version":"1.0.0","title":"3d Printer Filament Tracker","description":"For use in 3d print farms to automatically track number of spools, their colour, and the remaining quantity per spool. It will also automatically order new filament or it can be manually ordered."},"tags":[{"name":"spools","description":"Options for updating spools success and failures"}],"paths":{"/spools/updateSpool":{"post":{"tags":["used","success"],"summary":"Reports that print was success and length of filament used on a specific spool","description":"Updates the spools amount remaining. If spool is used up also update the number of spools remaining for that colour.","operationId":"app.printSuccess","responses":{"200":{"description":"successfully updated"},"400":{"description":"invalid input, invalid object"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/usedSpool"}}},"description":"updated spools"}}},"/device/updateFailure":{"post":{"tags":["failed","unused"],"operationId":"app.failedPrint","responses":{"200":{"description":"updated failure"},"400":{"description":"invalid input, invalid object"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/printFailure"}}},"description":"updated failure"}}}},"components":{"schemas":{"usedSpool":{"required":["spool_id","printer_id","mm_used","colour"],"properties":{"spool_id":{"type":"string","format":"uuid","example":"8528cb3f-3da8-4764-aca8-8c22a3da12aa"},"printer_id":{"type":"string","example":"P1S1903"},"mm_used":{"type":"integer","example":50},"colour":{"type":"string","example":"red"}},"type":"object"},"printFailure":{"required":["spool_id","printer_id","failure_code","timestamp"],"properties":{"spool_id":{"type":"string","format":"uuid","example":"8528cb3f-3da8-4764-aca8-8c22a3da12aa"},"printer_id":{"type":"string","example":"P1S1903"},"failure_code":{"type":"string","format":"uuid","example":null},"timestamp":{"type":"string","format":"date-time","example":"2023-01-08T10:44:23.001Z"}},"type":"object"}}}}