/v1 contract for Report Automation Tool. They are specification examples, not evidence that these endpoints are deployed.
The ErrorDetail object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}
The Error object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail"}}}}}},"ErrorDetail":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}
The JobError object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"JobError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["portal_login_failed","portal_unavailable","report_generation_failed","email_delivery_failed","internal_error"]},"message":{"type":"string","description":"Sanitized worker error."}}}}}}
The ReportJob object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"ReportJob":{"type":"object","required":["id","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","cancelling","succeeded","failed","cancelled"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reportId":{"type":["string","null"],"description":"Set after the PDF is stored, including when initial email subsequently fails."},"error":{"oneOf":[{"$ref":"#/components/schemas/JobError"},{"type":"null"}]}}},"JobError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["portal_login_failed","portal_unavailable","report_generation_failed","email_delivery_failed","internal_error"]},"message":{"type":"string","description":"Sanitized worker error."}}}}}}
The Report object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"Report":{"type":"object","required":["id","jobId","deviceId","filename","createdAt","expiresAt","deliveryStatus"],"properties":{"id":{"type":"string"},"jobId":{"type":"string"},"deviceId":{"type":"string"},"filename":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"deliveryStatus":{"type":"string","enum":["pending","sent","failed"]}}}}}}
The Client object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"Client":{"type":"object","required":["name","username","password"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"username":{"type":"string","minLength":1,"maxLength":256},"password":{"type":"string","format":"password","writeOnly":true,"minLength":1,"maxLength":4096},"logo":{"type":"string","description":"Optional HTTPS logo on an approved host.","format":"uri","pattern":"^https://"}},"additionalProperties":false}}}}
The TemperatureThreshold object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"TemperatureThreshold":{"type":"object","required":["min","max"],"properties":{"min":{"type":"number","description":"Inclusive low threshold in degrees Celsius; less than max."},"max":{"type":"number","description":"Inclusive high threshold in degrees Celsius; greater than min."}},"additionalProperties":false}}}}
The ReportDevice object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"ReportDevice":{"type":"object","required":["device_id","temp_threshold"],"properties":{"device_id":{"type":"string","minLength":1,"maxLength":128},"temp_threshold":{"$ref":"#/components/schemas/TemperatureThreshold"}},"additionalProperties":false},"TemperatureThreshold":{"type":"object","required":["min","max"],"properties":{"min":{"type":"number","description":"Inclusive low threshold in degrees Celsius; less than max."},"max":{"type":"number","description":"Inclusive high threshold in degrees Celsius; greater than min."}},"additionalProperties":false}}}}
The CreateReportJobRequest object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"CreateReportJobRequest":{"type":"object","required":["client","url","devices","fromDate","toDate","sentTo"],"properties":{"client":{"$ref":"#/components/schemas/Client"},"url":{"type":"string","description":"Allowlisted HTTPS portal URL.","format":"uri","pattern":"^https://"},"devices":{"type":"array","minItems":1,"maxItems":1,"items":{"$ref":"#/components/schemas/ReportDevice"}},"fromDate":{"type":"string","description":"UTC RFC 3339 timestamp ending in Z.","format":"date-time","pattern":"Z$"},"toDate":{"type":"string","description":"Later than fromDate and within 31 days.","format":"date-time","pattern":"Z$"},"sentTo":{"type":"array","minItems":1,"maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"email"}}},"additionalProperties":false},"Client":{"type":"object","required":["name","username","password"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"username":{"type":"string","minLength":1,"maxLength":256},"password":{"type":"string","format":"password","writeOnly":true,"minLength":1,"maxLength":4096},"logo":{"type":"string","description":"Optional HTTPS logo on an approved host.","format":"uri","pattern":"^https://"}},"additionalProperties":false},"ReportDevice":{"type":"object","required":["device_id","temp_threshold"],"properties":{"device_id":{"type":"string","minLength":1,"maxLength":128},"temp_threshold":{"$ref":"#/components/schemas/TemperatureThreshold"}},"additionalProperties":false},"TemperatureThreshold":{"type":"object","required":["min","max"],"properties":{"min":{"type":"number","description":"Inclusive low threshold in degrees Celsius; less than max."},"max":{"type":"number","description":"Inclusive high threshold in degrees Celsius; greater than min."}},"additionalProperties":false}}}}
The EmailDeliveryRequest object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"EmailDeliveryRequest":{"type":"object","required":["sentTo"],"properties":{"sentTo":{"type":"array","minItems":1,"maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"email"}}},"additionalProperties":false}}}}
The EmailDelivery object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"EmailDelivery":{"type":"object","required":["id","reportId","status","createdAt"],"properties":{"id":{"type":"string"},"reportId":{"type":"string"},"status":{"type":"string","enum":["queued","sending","sent","failed"]},"createdAt":{"type":"string","format":"date-time"},"error":{"oneOf":[{"$ref":"#/components/schemas/JobError"},{"type":"null"}]}}},"JobError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["portal_login_failed","portal_unavailable","report_generation_failed","email_delivery_failed","internal_error"]},"message":{"type":"string","description":"Sanitized worker error."}}}}}}
The ReportJobList object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"ReportJobList":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReportJob"}},"nextCursor":{"type":["string","null"]}}},"ReportJob":{"type":"object","required":["id","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","cancelling","succeeded","failed","cancelled"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reportId":{"type":["string","null"],"description":"Set after the PDF is stored, including when initial email subsequently fails."},"error":{"oneOf":[{"$ref":"#/components/schemas/JobError"},{"type":"null"}]}}},"JobError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["portal_login_failed","portal_unavailable","report_generation_failed","email_delivery_failed","internal_error"]},"message":{"type":"string","description":"Sanitized worker error."}}}}}}
The ReportList object
{"openapi":"3.1.0","info":{"title":"ReportGeneratorTool API","version":"1.0.0"},"components":{"schemas":{"ReportList":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Report"}},"nextCursor":{"type":["string","null"]}}},"Report":{"type":"object","required":["id","jobId","deviceId","filename","createdAt","expiresAt","deliveryStatus"],"properties":{"id":{"type":"string"},"jobId":{"type":"string"},"deviceId":{"type":"string"},"filename":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"deliveryStatus":{"type":"string","enum":["pending","sent","failed"]}}}}}}