# Downtime

## GET /issue

>

```json
{"openapi":"3.1.0","info":{"title":"Busroot HTTP APIs","version":"1.0.0"},"servers":[{"url":"https://demo.busroot.com/api","description":"Busroot Demo"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}}},"paths":{"/issue":{"get":{"tags":["Downtime"],"parameters":[{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"rangecode","schema":{"type":"string"}},{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1}},{"in":"query","name":"id","schema":{"type":"integer","minimum":0}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":0,"maximum":1000}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string","enum":["stop","slow","manual","stop_utilisation"]},"stationCode":{"type":"string"},"startAt":{"type":"string"},"endAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"startNotifiedAt":{"type":"string"},"endNotifiedAt":{"type":"string"},"accountId":{"type":"string"},"excludedAt":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"downtimeId":{"type":"number"},"type":{"type":"string","enum":["acknowledge","estimate","escalate","cause","exclude"]},"userId":{"type":"number"},"estimateEndAt":{"type":"string"},"notifiedAt":{"type":"string"},"causeCode":{"type":"string"},"accountId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"operatorInitials":{"type":"string"},"userEmail":{"type":"string"}},"required":["id","downtimeId","type","accountId","createdAt","updatedAt"]}},"isAcknowledged":{"type":"boolean"},"isEstimated":{"type":"boolean"},"isEscalated":{"type":"boolean"},"hasCause":{"type":"boolean"},"causeCode":{"type":"string"},"estimateEndAt":{"type":"string"},"ragStatus":{"type":"string","enum":["#cc3311","#ee7733","#009988","#33bbee","#CCCCCC"]},"statusText":{"type":"string"},"stationName":{"type":"string"},"causeBreadcrumb":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"parentReasonCode":{"type":["string","null"]},"type":{"type":"array","items":{"type":"string","enum":["downtime","non-production"]}}},"required":["code","description","type"]}},"startAtTimestamp":{"type":"number"},"endAtTimestamp":{"type":"number"},"duration":{"type":"number"},"durationFormatted":{"type":"string"},"skuCode":{"type":"string"},"skuName":{"type":"string"},"isOngoing":{"type":"boolean"}},"required":["id","type","stationCode","startAt","createdAt","updatedAt","accountId","events","isAcknowledged","isEstimated","isEscalated","hasCause","ragStatus","statusText","causeBreadcrumb","startAtTimestamp","isOngoing"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}}}}
```

## POST /issue

>

```json
{"openapi":"3.1.0","info":{"title":"Busroot HTTP APIs","version":"1.0.0"},"servers":[{"url":"https://demo.busroot.com/api","description":"Busroot Demo"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}}},"paths":{"/issue":{"post":{"tags":["Downtime"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["stop","slow","manual","stop_utilisation"]},"stationCode":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"}},"required":["type","stationCode","startAt"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string","enum":["stop","slow","manual","stop_utilisation"]},"stationCode":{"type":"string"},"startAt":{"type":"string"},"endAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"startNotifiedAt":{"type":"string"},"endNotifiedAt":{"type":"string"},"accountId":{"type":"string"},"excludedAt":{"type":"string"}},"required":["id","type","stationCode","startAt","createdAt","updatedAt","accountId"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}}}}
```

## GET /downtime/ongoing

>

```json
{"openapi":"3.1.0","info":{"title":"Busroot HTTP APIs","version":"1.0.0"},"servers":[{"url":"https://demo.busroot.com/api","description":"Busroot Demo"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}}},"paths":{"/downtime/ongoing":{"get":{"tags":["Downtime"],"parameters":[{"in":"query","name":"stationcodes","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string","enum":["stop","slow","manual","stop_utilisation"]},"stationCode":{"type":"string"},"startAt":{"type":"string"},"endAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"startNotifiedAt":{"type":"string"},"endNotifiedAt":{"type":"string"},"accountId":{"type":"string"},"excludedAt":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"downtimeId":{"type":"number"},"type":{"type":"string","enum":["acknowledge","estimate","escalate","cause","exclude"]},"userId":{"type":"number"},"estimateEndAt":{"type":"string"},"notifiedAt":{"type":"string"},"causeCode":{"type":"string"},"accountId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"operatorInitials":{"type":"string"},"userEmail":{"type":"string"}},"required":["id","downtimeId","type","accountId","createdAt","updatedAt"]}},"isAcknowledged":{"type":"boolean"},"isEstimated":{"type":"boolean"},"isEscalated":{"type":"boolean"},"hasCause":{"type":"boolean"},"causeCode":{"type":"string"},"estimateEndAt":{"type":"string"},"ragStatus":{"type":"string","enum":["#cc3311","#ee7733","#009988","#33bbee","#CCCCCC"]},"statusText":{"type":"string"},"stationName":{"type":"string"},"causeBreadcrumb":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"parentReasonCode":{"type":["string","null"]},"type":{"type":"array","items":{"type":"string","enum":["downtime","non-production"]}}},"required":["code","description","type"]}},"startAtTimestamp":{"type":"number"},"endAtTimestamp":{"type":"number"},"duration":{"type":"number"},"durationFormatted":{"type":"string"},"skuCode":{"type":"string"},"skuName":{"type":"string"},"isOngoing":{"type":"boolean"}},"required":["id","type","stationCode","startAt","createdAt","updatedAt","accountId","events","isAcknowledged","isEstimated","isEscalated","hasCause","ragStatus","statusText","causeBreadcrumb","startAtTimestamp","isOngoing"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}}}}
```

## GET /downtime/unreported-downtime/count

>

```json
{"openapi":"3.1.0","info":{"title":"Busroot HTTP APIs","version":"1.0.0"},"servers":[{"url":"https://demo.busroot.com/api","description":"Busroot Demo"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}}},"paths":{"/downtime/unreported-downtime/count":{"get":{"tags":["Downtime"],"parameters":[{"in":"query","name":"stationcodes","schema":{"type":"string"},"required":true},{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"stationCode":{"type":"string"},"count":{"type":"number"}},"required":["stationCode","count"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}}}}
```

## POST /downtime/{id}/event

>

```json
{"openapi":"3.1.0","info":{"title":"Busroot HTTP APIs","version":"1.0.0"},"servers":[{"url":"https://demo.busroot.com/api","description":"Busroot Demo"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}}},"paths":{"/downtime/{id}/event":{"post":{"tags":["Downtime"],"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":0},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["acknowledge","estimate","escalate","cause","exclude"]},"estimatedTime":{"type":"number","minimum":0},"causeCode":{"type":"string","minLength":1},"operator":{"type":"string"}},"required":["type"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"}},"required":["isSuccess"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}}}}
```

## GET /downtime

>

```json
{"openapi":"3.1.0","info":{"title":"Busroot HTTP APIs","version":"1.0.0"},"servers":[{"url":"https://demo.busroot.com/api","description":"Busroot Demo"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}}},"paths":{"/downtime":{"get":{"tags":["Downtime"],"parameters":[{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true},{"in":"query","name":"aggregatewindow","schema":{"type":"string"}},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"skucodes","description":"Comma-separated list of SKU Codes.","schema":{"type":"string","description":"Comma-separated list of SKU Codes."}},{"in":"query","name":"includefuture","schema":{"type":"string","minLength":1}},{"in":"query","name":"inshiftaverages","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"stationCode":{"type":"string"},"stationName":{"type":"string"},"stationGroupCode":{"type":"string"},"stationGroupName":{"type":"string"},"reliabilityData":{"type":"object","properties":{"runningsCount":{"type":"number"},"stopsCount":{"type":"number"},"totalRunningTime":{"type":"number"},"totalStoppedTime":{"type":"number"}},"required":["runningsCount","stopsCount","totalRunningTime","totalStoppedTime"]},"cycleTimeAnalysis":{"type":"object","properties":{"avg":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"quantity":{"type":"number"},"default":{"type":"number"},"stations":{"type":"array","items":{"type":"object","properties":{"stationCode":{"type":"string"},"stationName":{"type":"string"},"avg":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"quantity":{"type":"number"}},"required":["stationCode","stationName","avg","min","max","quantity"]}}},"required":["avg","min","max","quantity","stations"]},"oee":{"type":"object","properties":{"scheduleMs":{"type":"number","description":"The number of milliseconds spent on any schedule."},"scheduleLossMs":{"type":"number","description":"The number of milliseconds lost to unscheduled time in shift."},"schedulePerc":{"type":"number","description":"The ratio of scheduled to unscheduled time."},"productionScheduleMs":{"type":"number","description":"The number of milliseconds spent in a production schedule."},"productionScheduleLossMs":{"type":"number","description":"The number of milliseconds lost to non-production schedules."},"productionSchedulePerc":{"type":"number","description":"The ratio of production to non-production scheduled time."},"availabilityMs":{"type":"number","description":"The number of milliseconds spent running."},"availabilityLossMs":{"type":"number","description":"The number of milliseconds spend stopped."},"availabilityPerc":{"type":"number","description":"The ratio of running to stopped time aka OEE Availability."},"performanceMs":{"type":"number","description":"The number of milliseconds spend producing under ideal circumstances (production count * ideal cycle time)."},"performanceLossMs":{"type":"number","description":"The number of milliseconds lost to under-production vs ideal cycle times."},"performancePerc":{"type":"number","description":"OEE Performance."},"goodQualityCount":{"type":"number","description":"The number of good quality units produced."},"goodQualityLossCount":{"type":"number","description":"The number of bad quality units produced."},"goodQualityPerc":{"type":"number","description":"The ratio of good units to bad units aka OEE Quality."},"scheduledNonProduction":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"duration":{"type":"number"},"cost":{"type":"number"},"percent":{"type":"number"},"energy":{"type":"number"},"energyCost":{"type":"number"}},"required":["code","description","duration","cost","percent","energy","energyCost"]}},"stops":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"duration":{"type":"number"},"cost":{"type":"number"},"percent":{"type":"number"},"energy":{"type":"number"},"energyCost":{"type":"number"}},"required":["code","description","duration","cost","percent","energy","energyCost"]}},"oee":{"type":"number"}},"required":["scheduleMs","scheduleLossMs","schedulePerc","productionScheduleMs","productionScheduleLossMs","productionSchedulePerc","availabilityMs","availabilityLossMs","availabilityPerc","performanceMs","performanceLossMs","performancePerc","goodQualityCount","goodQualityLossCount","goodQualityPerc","scheduledNonProduction","stops","oee"]},"nominal":{"type":"object","properties":{"electricalPowerNominalKw":{"type":"number"}},"required":["electricalPowerNominalKw"]},"downtimes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["stop","slow","manual","stop_utilisation"]},"stationCode":{"type":"string"},"reasonCode":{"type":"string"},"startTimestamp":{"type":"number"},"endTimestamp":{"type":"number"},"range":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"duration":{"type":"number"},"fromIso":{"type":"string"},"toIso":{"type":"string"},"durationFormatted":{"type":"string"}},"required":["from","to","duration","fromIso","toIso","durationFormatted"]}},"required":["type","stationCode","startTimestamp","range"]}}},"required":["stationCode","stationName","stationGroupCode","stationGroupName","reliabilityData","oee","nominal","downtimes"]}},"range":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"duration":{"type":"number"},"fromIso":{"type":"string"},"toIso":{"type":"string"},"durationFormatted":{"type":"string"}},"required":["from","to","duration","fromIso","toIso","durationFormatted"]}},"required":["isSuccess","results","range"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.output.industries/technical-onboarding/integration/http-api-reference/downtime.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
