{"openapi":"3.0.4","info":{"title":"OttoTasks Reporting API","description":"Read-only, paged reporting endpoints for one company. Page with page/pageSize until hasMore is false.","version":"v1"},"servers":[{"url":"https://api.ottotasks.dev.carbonai.ca"}],"paths":{"/v1/campaigns":{"get":{"tags":["Reporting"],"summary":"Campaigns","operationId":"get-campaigns","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"after","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingMessage"}]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingError"}]}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignReportPage"}}}}}}},"/v1/tasks":{"get":{"tags":["Reporting"],"summary":"Tasks: campaign, scheduled/ad-hoc and workflow tasks","operationId":"get-tasks","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"after","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"campaignId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"completedSince","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingMessage"}]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingError"}]}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskReportPage"}}}}}}},"/v1/task-values":{"get":{"tags":["Reporting"],"summary":"Answered Verify and Check steps","description":"Paged over tasks, not rows: a page holds every value for up to pageSize tasks, so a task\u0027s values never split across pages. Keep paging until hasMore is false.","operationId":"get-task-values","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"after","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"campaignId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"completedSince","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingMessage"}]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingError"}]}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskValueReportPage"}}}}}}},"/v1/task-exceptions":{"get":{"tags":["Reporting"],"summary":"Exceptions raised on tasks","description":"Open exceptions only unless includeCleared=true. Paged over tasks, not rows: a page holds every exception for up to pageSize tasks. Keep paging until hasMore is false.","operationId":"get-task-exceptions","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"after","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"taskId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"campaignId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"completedSince","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"includeCleared","in":"query","schema":{"type":"boolean"}}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingMessage"}]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingError"}]}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskExceptionReportPage"}}}}}}},"/v1/assets":{"get":{"tags":["Reporting"],"summary":"Assets","operationId":"get-assets","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"after","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingMessage"}]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingError"}]}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetReportPage"}}}}}}},"/v1/asset-values":{"get":{"tags":["Reporting"],"summary":"Asset anchor values","description":"Paged over assets, not rows: a page holds every value for up to pageSize assets, so an asset\u0027s values never split across pages. Keep paging until hasMore is false.","operationId":"get-asset-values","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"after","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"assetId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingMessage"}]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingError"}]}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetValueReportPage"}}}}}}},"/v1/locations":{"get":{"tags":["Reporting"],"summary":"Locations","operationId":"get-locations","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"after","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingMessage"}]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReportingError"}]}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationReportPage"}}}}}}}},"components":{"schemas":{"AssetReportPage":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/AssetReportRow"}]},"nullable":true},"pageSize":{"type":"integer","format":"int32"},"hasMore":{"type":"boolean"},"nextAfter":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"AssetReportRow":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"identifier":{"type":"string","nullable":true},"assetType":{"type":"string","nullable":true},"tag":{"type":"string","nullable":true},"division":{"type":"string","nullable":true},"area":{"type":"string","nullable":true},"locationId":{"type":"string","format":"uuid","nullable":true},"latitude":{"type":"number","format":"double","nullable":true},"longitude":{"type":"number","format":"double","nullable":true},"positionIsApproximate":{"type":"boolean"},"isActive":{"type":"boolean"}},"additionalProperties":false},"AssetValueReportPage":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/AssetValueReportRow"}]},"nullable":true},"pageSize":{"type":"integer","format":"int32"},"hasMore":{"type":"boolean"},"nextAfter":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"AssetValueReportRow":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid"},"anchorId":{"type":"string","format":"uuid"},"field":{"type":"string","nullable":true},"value":{"type":"string","nullable":true},"dateChanged":{"type":"string","format":"date","nullable":true}},"additionalProperties":false},"CampaignReportPage":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/CampaignReportRow"}]},"nullable":true},"pageSize":{"type":"integer","format":"int32"},"hasMore":{"type":"boolean"},"nextAfter":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"CampaignReportRow":{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true}},"additionalProperties":false},"LocationReportPage":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/LocationReportRow"}]},"nullable":true},"pageSize":{"type":"integer","format":"int32"},"hasMore":{"type":"boolean"},"nextAfter":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"LocationReportRow":{"type":"object","properties":{"locationId":{"type":"string","format":"uuid"},"identifier":{"type":"string","nullable":true},"locationType":{"type":"string","nullable":true},"division":{"type":"string","nullable":true},"area":{"type":"string","nullable":true},"latitude":{"type":"number","format":"double","nullable":true},"longitude":{"type":"number","format":"double","nullable":true}},"additionalProperties":false},"ReportingError":{"type":"object","properties":{"message":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true}},"additionalProperties":false},"ReportingMessage":{"type":"object","properties":{"message":{"type":"string","nullable":true}},"additionalProperties":false},"TaskExceptionReportPage":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TaskExceptionReportRow"}]},"nullable":true},"pageSize":{"type":"integer","format":"int32"},"hasMore":{"type":"boolean"},"nextAfter":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"TaskExceptionReportRow":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid"},"exceptionId":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"severity":{"type":"string","nullable":true},"section":{"type":"string","nullable":true},"step":{"type":"string","nullable":true},"actionType":{"type":"string","nullable":true},"isCleared":{"type":"boolean"},"resolution":{"type":"string","nullable":true},"raisedOn":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"TaskReportPage":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TaskReportRow"}]},"nullable":true},"pageSize":{"type":"integer","format":"int32"},"hasMore":{"type":"boolean"},"nextAfter":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"TaskReportRow":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"templateName":{"type":"string","nullable":true},"campaignId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","nullable":true},"targetType":{"type":"string","nullable":true},"assetId":{"type":"string","format":"uuid","nullable":true},"assetIdentifier":{"type":"string","nullable":true},"locationId":{"type":"string","format":"uuid","nullable":true},"locationIdentifier":{"type":"string","nullable":true},"division":{"type":"string","nullable":true},"area":{"type":"string","nullable":true},"assignedTo":{"type":"string","nullable":true},"completedBy":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"completedOn":{"type":"string","format":"date-time","nullable":true},"mergedOn":{"type":"string","format":"date-time","nullable":true},"rejectedOn":{"type":"string","format":"date-time","nullable":true},"closedOn":{"type":"string","format":"date-time","nullable":true},"latitude":{"type":"number","format":"double","nullable":true},"longitude":{"type":"number","format":"double","nullable":true},"hasExceptions":{"type":"boolean"}},"additionalProperties":false},"TaskValueReportPage":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TaskValueReportRow"}]},"nullable":true},"pageSize":{"type":"integer","format":"int32"},"hasMore":{"type":"boolean"},"nextAfter":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"TaskValueReportRow":{"type":"object","properties":{"taskId":{"type":"string","format":"uuid"},"section":{"type":"string","nullable":true},"actionType":{"type":"string","nullable":true},"question":{"type":"string","nullable":true},"anchorId":{"type":"string","format":"uuid","nullable":true},"previousValue":{"type":"string","nullable":true},"value":{"type":"string","nullable":true},"isVerified":{"type":"boolean","nullable":true},"isUnknown":{"type":"boolean","nullable":true},"isNotApplicable":{"type":"boolean","nullable":true}},"additionalProperties":false}},"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.ottotasks.com/connect/token","scopes":{"lukla_ottotasks_api":"OttoTasks reporting API"}}}}}},"security":[{"oauth2":["lukla_ottotasks_api"]}]}