{
  "openapi": "3.0.3",
  "info": {
    "title": "Public Status API",
    "version": "1.0",
    "description": "The public status API allows to get an overall status for the Retarus Cloud Services. This includes current incidents, \nplanned maintenances or important service information. Separated by service and region.\n\nFor the public dashboard visit: [https://status.retarus.io](https://status.retarus.io)\n"
  },
  "servers": [
    {
      "url": "https://api.retarus.com"
    }
  ],
  "tags": [
    {
      "name": "Status",
      "description": "View the current global service status"
    }
  ],
  "paths": {
    "/status/1.0": {
      "get": {
        "tags": [
          "Status"
        ],
        "responses": {
          "200": {
            "description": "Contains information about all available services.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "StatusResponse": {
        "type": "object",
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "status_overall": {
                "$ref": "#/components/schemas/OverallStatus"
              },
              "status": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Status"
                }
              },
              "incidents": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Incident"
                }
              },
              "maintenance": {
                "type": "object",
                "properties": {
                  "active": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Maintenance"
                    }
                  },
                  "upcoming": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Maintenance"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "OverallStatus": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "status_code": {
            "type": "integer"
          }
        },
        "required": [
          "updated",
          "status",
          "status_code"
        ]
      },
      "Status": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "example": "EAS Portal"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/IncidentStatus"
          },
          "status_code": {
            "$ref": "#/components/schemas/IncidentStatusCode"
          },
          "containers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Container"
            }
          }
        },
        "required": [
          "id",
          "name",
          "updated",
          "status",
          "status_code",
          "containers"
        ]
      },
      "Container": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "example": "DE1"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/IncidentStatus"
          },
          "status_code": {
            "$ref": "#/components/schemas/IncidentStatusCode"
          }
        },
        "required": [
          "id",
          "name",
          "updated",
          "status",
          "status_code"
        ]
      },
      "Incident": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "EDI - Degraded performance"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "datetime_open": {
            "type": "string",
            "format": "date-time"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "containers_affected": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContainerRef"
            }
          },
          "components_affected": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComponentRef"
            }
          }
        },
        "required": [
          "name",
          "_id",
          "datetime_open",
          "messages",
          "containers_affected",
          "components_affected"
        ]
      },
      "Maintenance": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "SMS - Service Maintenance"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "datetime_open": {
            "type": "string",
            "format": "date-time"
          },
          "datetime_planned_start": {
            "type": "string",
            "format": "date-time"
          },
          "datetime_planned_end": {
            "type": "string",
            "format": "date-time"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "containers_affected": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContainerRef"
            }
          },
          "components_affected": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComponentRef"
            },
            "required": [
              "name",
              "_id",
              "datetime_open",
              "datetime_planned_start",
              "datetime_planned_end",
              "messages",
              "containers_affected",
              "components_affected"
            ]
          }
        }
      },
      "ComponentRef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "EAS Portal"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "name",
          "_id"
        ]
      },
      "ContainerRef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "DE1"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "name",
          "_id"
        ]
      },
      "Message": {
        "type": "object",
        "properties": {
          "details": {
            "type": "string",
            "example": "We have identified the issue and are working on the resolution."
          },
          "state": {
            "type": "integer",
            "example": 200,
            "enum": [
              100,
              200,
              300
            ],
            "description": "Status:\n * default - Resolved\n * `100` - Investigating\n * `200` - Identified\n * `300` - Monitoring\n"
          },
          "status": {
            "$ref": "#/components/schemas/IncidentStatusCode"
          },
          "datetime": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "details",
          "state",
          "status",
          "datetime"
        ]
      },
      "IncidentStatus": {
        "type": "string",
        "enum": [
          "Operational",
          "Degraded Performance",
          "Partial Service Disruption",
          "Service Disruption",
          "Security Event"
        ]
      },
      "IncidentStatusCode": {
        "type": "integer",
        "enum": [
          100,
          300,
          400,
          500,
          600
        ],
        "description": "Status:\n  * `100` - Operational\n  * `300` - Degraded Performance\n  * `400` - Partial Service Disruption\n  * `500` - Service Disruption\n  * `600` - Security Event\n"
      }
    }
  }
}