{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/AASA/AASA-API/1.0.0"},{"description":"DEV api","url":"https://dev.api.aginspect.io"}],"info":{"description":"AASA Inspections API","version":"1.0.0","title":"AASA Insepctions","contact":{"email":"ben@asmark.org"}},"tags":[{"name":"Completed Inspections","description":"Retreiving inspection info"},{"name":"Bulk Sites","description":"NOT YET AVAILABLE - Control endpoints to maintain bulk sites"}],"security":[{"bearerAuth":[]}],"paths":{"/inspections":{"get":{"tags":["Completed Inspections"],"summary":"Get Inspections","operationId":"getInspections","description":"By passing in the appropriate options, you can search for\ncompleted inspections in the system\n","parameters":[{"in":"query","name":"confirmedAfter","description":"time at which inspection cleared processing (utc)","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"skip","description":"number of records to skip for pagination","schema":{"type":"integer","format":"int32","minimum":0}},{"in":"query","name":"limit","description":"maximum number of records to return","schema":{"type":"integer","format":"int32","minimum":0,"maximum":50}}],"responses":{"200":{"description":"Inspections matching criteria","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Inspection"}}}}},"400":{"description":"bad input parameter"}}}},"/inspections/{id}":{"get":{"tags":["Completed Inspections"],"summary":"Get Inspection","operationId":"getInspection","description":"Request a unique inspection\n","parameters":[{"in":"path","name":"id","description":"inspection uuid","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Inspection","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Inspection"}}}}},"400":{"description":"bad input parameter"}}}},"/inspections/subscription/test":{"get":{"tags":["Completed Inspections"],"summary":"Test subscriber","operationId":"invokeHook","description":"Test the subscription associated with this api account\n","responses":{"200":{"description":"Inspections matching criteria","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"POST sent to <url-on-file>"}}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Inspection":{"type":"object","required":["id","siteId","mfrSiteId","scheduledAt","inspectedAt","confirmedAt","siteQuestions","tanks","containments"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"siteId":{"type":"string","format":"uuid","example":"eed40a00-d652-11ee-bc83-15d3c8f9d366"},"mfrSiteId":{"type":"string","example":"id-originally-provided-by-requesting-mfr"},"epaEstNo":{"type":"string","example":"12325-IL-012"},"scheduledAt":{"type":"string","format":"date-time","example":"2024-02-29T09:12:33.001Z"},"inspectedAt":{"type":"string","format":"date-time","example":"2024-06-15T09:12:33.001Z"},"confirmedAt":{"type":"string","format":"date-time","example":"2024-06-15T11:12:33.001Z"},"siteQuestions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"tanks":{"type":"array","items":{"$ref":"#/components/schemas/Tank"}},"containments":{"type":"array","items":{"$ref":"#/components/schemas/Containment"}}}},"Question":{"type":"object","required":["id","response"],"properties":{"id":{"type":"string","example":"21b"},"response":{"type":"string","example":"Y"},"details":{"type":"string","example":"Longer response when required by the selection"},"photos":{"type":"array","items":{"type":"string","format":"url","description":"aws s3 bucket hosted jpg","example":"https://aasa.s3.amazonaws.com/uploads/1350980asdg0a98f091.jpg"}}}},"Tank":{"type":"object","required":["id","number","questions"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f8dj7"},"number":{"type":"string","example":1,"description":"Tank number according to the site map"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"photos":{"type":"array","items":{"type":"string","format":"url","description":"aws s3 bucket hosted jpg","example":"https://aasa.s3.amazonaws.com/uploads/1350980asdg0a98f091.jpg"}}}},"Containment":{"type":"object","required":["id","number","type","questions"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f8dj7"},"number":{"type":"string","example":1,"description":"Tank number according to the site map"},"type":{"type":"string","enum":["Containment","Transfer"],"example":"Containment"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"photos":{"type":"array","items":{"type":"string","format":"url","description":"aws s3 bucket hosted jpg","example":"https://aasa.s3.amazonaws.com/uploads/1350980asdg0a98f091.jpg"}}}}}}}