2024-08-11 16:15:30 +03:00
{
"openapi" : "3.1.0" ,
"info" : {
2024-08-12 21:40:15 +03:00
"title" : "BlueWave Uptime" ,
2024-08-11 16:15:30 +03:00
"summary" : "BlueWave Uptime OpenAPI Specifications" ,
"description" : "BlueWave Uptime is an open source server monitoring application used to track the operational status and performance of servers and websites. It regularly checks whether a server/website is accessible and performs optimally, providing real-time alerts and reports on the monitored services' availability, downtime, and response time." ,
"contact" : {
"name" : "API Support" ,
2024-08-11 18:52:19 +03:00
"url" : "mailto:support@bluewavelabs.ca" ,
"email" : "support@bluewavelabs.ca"
2024-08-11 16:15:30 +03:00
},
"license" : {
"name" : "AGPLv3" ,
"url" : "https://github.com/bluewave-labs/bluewave-uptime/tree/HEAD/LICENSE"
},
"version" : "1.0"
},
"servers" : [
{
2024-08-11 19:03:02 +03:00
"url" : "http://localhost:{PORT}/{API_PATH}" ,
2024-08-11 16:15:30 +03:00
"description" : "Local Development Server" ,
"variables" : {
"PORT" : {
2024-08-11 19:03:02 +03:00
"description" : "API Port" ,
2024-08-11 16:15:30 +03:00
"enum" : [ "5000" , "3000" , "8080" ],
"default" : "5000"
2024-08-11 19:03:02 +03:00
},
"API_PATH" : {
"description" : "API Base Path" ,
"enum" : [ "api/v1" , "api/v1.1" , "api/v2" ],
"default" : "api/v1"
2024-08-11 16:15:30 +03:00
}
}
}
2024-08-12 21:39:10 +03:00
],
"tags" : [
{
"name" : "auth" ,
"description" : "Authentication"
2024-08-31 13:44:23 +03:00
},
{
"name" : "invite" ,
"description" : "Invite"
},
{
"name" : "monitors" ,
"description" : "Monitors"
},
{
"name" : "checks" ,
"description" : "Checks"
},
{
"name" : "alerts" ,
"description" : "Alerts"
},
{
"name" : "pagespeed" ,
"description" : "Page Speed"
},
{
"name" : "maintenance-window" ,
"description" : "Maintenance window"
},
{
"name" : "healthy" ,
"description" : "Health check"
},
{
"name" : "mail" ,
"description" : "Mail service"
2024-08-12 21:39:10 +03:00
}
],
"paths" : {
"/auth/register" : {
"post" : {
"tags" : [ "auth" ],
"description" : "Register a new user" ,
2024-08-30 21:09:16 +03:00
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"required" : [ "firstName" , "lastName" , "email" , "password" , "role" , "teamId" ],
"properties" : {
"firstName" : {
"type" : "string"
},
"lastName" : {
"type" : "string"
},
"email" : {
"type" : "string" ,
"format" : "email"
},
"password" : {
"type" : "string" ,
"format" : "password"
},
"profileImage" : {
"type" : "file" ,
"format" : "file"
},
"role" : {
"type" : "array" ,
"enum" : [[ "user" ], [ "admin" ], [ "superadmin" ]],
"default" : [ "superadmin" ]
},
"teamId" : {
"type" : "string" ,
"format" : "uuid"
}
}
}
}
}
},
2024-08-12 21:39:10 +03:00
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/login" : {
"post" : {
"tags" : [ "auth" ],
"description" : "Login with credentials" ,
2024-08-30 21:09:16 +03:00
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"required" : [ "email" , "password" ],
"properties" : {
"email" : {
"type" : "string" ,
"format" : "email"
},
"password" : {
"type" : "string" ,
"format" : "password"
}
}
}
}
}
},
2024-08-12 21:39:10 +03:00
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/user/:userId" : {
"put" : {
"tags" : [ "auth" ],
"description" : "Change user informations" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
},
"delete" : {
"tags" : [ "auth" ],
"description" : "Delete user" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/users/admin" : {
"get" : {
"tags" : [ "auth" ],
"description" : "Checks to see if an admin account exists" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/users" : {
"get" : {
"tags" : [ "auth" ],
"description" : "Get all users" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/invite" : {
"post" : {
"tags" : [ "auth" ],
"description" : "Invite people to application" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/invite/verify" : {
"post" : {
"tags" : [ "auth" ],
"description" : "Verify the invite" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/recovery/request" : {
"post" : {
"tags" : [ "auth" ],
"description" : "Request a recovery token" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/recovery/validate" : {
"post" : {
"tags" : [ "auth" ],
"description" : "Validate recovery token" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
},
"/auth/recovery/reset" : {
"post" : {
"tags" : [ "auth" ],
"description" : "Password reset" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
2024-08-18 20:01:34 +03:00
"$ref" : "#/components/schemas/UserSuccessResponse"
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
},
"422" : {
"description" : "Unprocessable Content" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
2024-08-13 00:14:29 +03:00
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
2024-08-12 21:39:10 +03:00
}
}
}
}
2024-08-31 13:51:36 +03:00
},
"/healthy" : {
"get" : {
"tags" : [ "healthy" ],
"description" : "Health check" ,
"responses" : {
"200" : {
"description" : "OK" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
}
}
}
}
}
},
"500" : {
"description" : "Internal Server Error" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
}
}
}
}
}
}
}
}
2024-08-12 21:39:10 +03:00
}
2024-08-13 00:14:29 +03:00
},
"components" : {
"schemas" : {
"ErrorResponse" : {
"type" : "object" ,
"properties" : {
"success" : {
"type" : "boolean"
},
"msg" : {
"type" : "string"
}
}
},
"SuccessResponse" : {
"type" : "object" ,
"properties" : {
"success" : {
"type" : "boolean"
},
"msg" : {
"type" : "string"
},
"data" : {
"type" : "object"
}
}
2024-08-18 20:01:34 +03:00
},
"UserSuccessResponse" : {
"type" : "object" ,
"properties" : {
"success" : {
"type" : "boolean"
},
"msg" : {
"type" : "string"
},
"data" : {
"type" : "object" ,
"$ref" : "#/components/schemas/UserDataType"
}
}
},
"MonitorSuccessResponse" : {
"type" : "object" ,
"properties" : {
"success" : {
"type" : "boolean"
},
"msg" : {
"type" : "string"
},
"data" : {
"type" : "object" ,
"$ref" : "#/components/schemas/MonitorDataType"
}
}
},
"CheckDataSuccessResponse" : {
"type" : "object" ,
"properties" : {
"success" : {
"type" : "boolean"
},
"msg" : {
"type" : "string"
},
"data" : {
"type" : "object" ,
"$ref" : "#/components/schemas/CheckDataType"
}
}
},
"AlertDataSuccessResponse" : {
"type" : "object" ,
"properties" : {
"success" : {
"type" : "boolean"
},
"msg" : {
"type" : "string"
},
"data" : {
"type" : "object" ,
"$ref" : "#/components/schemas/AlertDataType"
}
}
},
"UserDataType" : {
"type" : "object" ,
"required" : [
"firstname" ,
"lastname" ,
"email" ,
"profilePicUrl" ,
"isActive" ,
"isVerified" ,
2024-08-18 20:20:28 +03:00
"updatedAt" ,
"createdAt"
2024-08-18 20:01:34 +03:00
],
"properties" : {
"firstname" : {
"type" : "string"
},
"lastname" : {
"type" : "string"
},
"email" : {
"type" : "string" ,
"format" : "email"
},
"profilePicUrl" : {
"type" : "string"
},
"isActive" : {
"type" : "boolean"
},
"isVerified" : {
"type" : "boolean"
},
2024-08-18 20:20:28 +03:00
"updatedAt" : {
2024-08-18 20:01:34 +03:00
"type" : "string"
},
2024-08-18 20:20:28 +03:00
"createdAt" : {
2024-08-18 20:01:34 +03:00
"type" : "string"
}
}
},
"MonitorDataType" : {
"type" : "object" ,
"required" : [
"userId" ,
"name" ,
"description" ,
"url" ,
"isActive" ,
"interval" ,
"updatedAt" ,
"createdAt"
],
"properties" : {
"userId" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"description" : {
"type" : "string"
},
"url" : {
"type" : "string"
},
"isActive" : {
"type" : "boolean"
},
"interval" : {
"type" : "integer"
},
"updatedAt" : {
"type" : "string"
},
"createdAt" : {
"type" : "string"
}
}
},
"CheckDataType" : {
"type" : "object" ,
"required" : [
"monitorId" ,
"status" ,
"responseTime" ,
"statusCode" ,
"message" ,
"updatedAt" ,
"createdAt"
],
"properties" : {
"monitorId" : {
"type" : "string"
},
"status" : {
"type" : "string"
},
"responseTime" : {
"type" : "integer"
},
"statusCode" : {
"type" : "integer"
},
"message" : {
"type" : "string"
},
"updatedAt" : {
"type" : "string"
},
"createdAt" : {
"type" : "string"
}
}
},
"AlertDataType" : {
"type" : "object" ,
"required" : [
"checkId" ,
"monitorId" ,
"userId" ,
"status" ,
"message" ,
"notifiedStatus" ,
"acknowledgedStatus" ,
"updatedAt" ,
"createdAt"
],
"properties" : {
"checkId" : {
"type" : "string"
},
"monitorId" : {
"type" : "string"
},
"userId" : {
"type" : "string"
},
"status" : {
"type" : "string"
},
"message" : {
"type" : "string"
},
"notifiedStatus" : {
"type" : "boolean"
},
"acknowledgedStatus" : {
"type" : "boolean"
},
"updatedAt" : {
"type" : "string"
},
"createdAt" : {
"type" : "string"
}
}
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
2024-08-11 16:15:30 +03:00
}