{
  "openapi": "3.0.1",
  "info": {
    "title": "Omni Status API",
    "version": "1.0.1",
    "description": "Reports the availability of Modica's public messaging services (REST, SMPP, SOAP and so on) as observed by Pingdom. Results are cached briefly, so a status change can take up to a minute to appear. This API is open to the world and requires no authentication.",
    "contact": {
      "name": "Modica Group API Support",
      "email": "support@modicagroup.com",
      "url": "http://support.modicagroup.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://www.modicagroup.com"
    }
  },
  "tags": [
    {
      "name": "Status",
      "description": "Availability of Modica's public messaging services."
    }
  ],
  "servers": [
    {
      "url": "https://api.modicagroup.com/rest/services/v1"
    }
  ],
  "paths": {
    "/status": {
      "get": {
        "operationId": "getServiceStatuses",
        "summary": "Get the status of one or more services",
        "description": "Returns the availability of each requested service. Repeat the `service` query parameter once per service, for example `?service=smpp&service=soap`. A service with no matching Pingdom check is reported as `unknown`.",
        "tags": [
          "Status"
        ],
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "description": "Name of a service to report on. May be repeated.",
            "schema": {
              "type": "array",
              "maxItems": 50,
              "items": {
                "type": "string",
                "maxLength": 64,
                "pattern": "^[a-z0-9-]+$"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service Statuses",
            "headers": {
              "Content-Security-Policy": {
                "description": "Content Security Policy to prevent certain types of attacks.",
                "schema": {
                  "type": "string",
                  "maxLength": 1024,
                  "pattern": "^[\\u0020-\\u007E]+$"
                }
              },
              "Strict-Transport-Security": {
                "description": "HSTS header to enforce HTTPS",
                "schema": {
                  "type": "string",
                  "maxLength": 128,
                  "example": "max-age=31536000; includeSubDomains; preload",
                  "pattern": "^max-age=[0-9]+(; includeSubDomains)?(; preload)?$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "services": {
                      "type": "object",
                      "example": {
                        "rest": {
                          "status": "available"
                        },
                        "smpp": {
                          "status": "unavailable"
                        }
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "unavailable",
                              "available",
                              "unknown"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Health check service temporarily unavailable",
            "headers": {
              "Content-Security-Policy": {
                "description": "Content Security Policy to prevent certain types of attacks.",
                "schema": {
                  "type": "string",
                  "maxLength": 1024,
                  "pattern": "^[\\u0020-\\u007E]+$"
                }
              },
              "Strict-Transport-Security": {
                "description": "HSTS header to enforce HTTPS",
                "schema": {
                  "type": "string",
                  "maxLength": 128,
                  "example": "max-age=31536000; includeSubDomains; preload",
                  "pattern": "^max-age=[0-9]+(; includeSubDomains)?(; preload)?$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "maxLength": 256,
                      "pattern": "^[\\u0020-\\u007E]+$",
                      "example": "Health check service temporarily unavailable"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Default Error Response",
            "headers": {
              "Content-Security-Policy": {
                "description": "Content Security Policy to prevent certain types of attacks.",
                "schema": {
                  "type": "string",
                  "maxLength": 1024,
                  "pattern": "^[\\u0020-\\u007E]+$"
                }
              },
              "Strict-Transport-Security": {
                "description": "HSTS header to enforce HTTPS",
                "schema": {
                  "type": "string",
                  "maxLength": 128,
                  "example": "max-age=31536000; includeSubDomains; preload",
                  "pattern": "^max-age=[0-9]+(; includeSubDomains)?(; preload)?$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "maxLength": 256,
                      "pattern": "^[\\u0020-\\u007E]+$"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/services": {
      "get": {
        "operationId": "listServices",
        "summary": "List the services that can be queried",
        "description": "Returns the names of every service this API can report on. Use these names as the `service` query parameter values on `/status`.",
        "tags": [
          "Status"
        ],
        "responses": {
          "200": {
            "description": "List of Services",
            "headers": {
              "Content-Security-Policy": {
                "description": "Content Security Policy to prevent certain types of attacks.",
                "schema": {
                  "type": "string",
                  "maxLength": 1024,
                  "pattern": "^[\\u0020-\\u007E]+$"
                }
              },
              "Strict-Transport-Security": {
                "description": "HSTS header to enforce HTTPS",
                "schema": {
                  "type": "string",
                  "maxLength": 128,
                  "example": "max-age=31536000; includeSubDomains; preload",
                  "pattern": "^max-age=[0-9]+(; includeSubDomains)?(; preload)?$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "services": {
                      "type": "array",
                      "maxItems": 100,
                      "items": {
                        "type": "string",
                        "maxLength": 64,
                        "pattern": "^[a-z0-9-]+$"
                      },
                      "example": [
                        "rest",
                        "smpp",
                        "soap",
                        "http"
                      ]
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Health check service temporarily unavailable",
            "headers": {
              "Content-Security-Policy": {
                "description": "Content Security Policy to prevent certain types of attacks.",
                "schema": {
                  "type": "string",
                  "maxLength": 1024,
                  "pattern": "^[\\u0020-\\u007E]+$"
                }
              },
              "Strict-Transport-Security": {
                "description": "HSTS header to enforce HTTPS",
                "schema": {
                  "type": "string",
                  "maxLength": 128,
                  "example": "max-age=31536000; includeSubDomains; preload",
                  "pattern": "^max-age=[0-9]+(; includeSubDomains)?(; preload)?$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "maxLength": 256,
                      "pattern": "^[\\u0020-\\u007E]+$",
                      "example": "Health check service temporarily unavailable"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Default Error Response",
            "headers": {
              "Content-Security-Policy": {
                "description": "Content Security Policy to prevent certain types of attacks.",
                "schema": {
                  "type": "string",
                  "maxLength": 1024,
                  "pattern": "^[\\u0020-\\u007E]+$"
                }
              },
              "Strict-Transport-Security": {
                "description": "HSTS header to enforce HTTPS",
                "schema": {
                  "type": "string",
                  "maxLength": 128,
                  "example": "max-age=31536000; includeSubDomains; preload",
                  "pattern": "^max-age=[0-9]+(; includeSubDomains)?(; preload)?$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "maxLength": 256,
                      "pattern": "^[\\u0020-\\u007E]+$"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
