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" ,
2024-09-24 13:56:58 +08:00
"required" : [
"firstName" ,
"lastName" ,
"email" ,
"password" ,
"role" ,
"teamId"
],
2024-08-30 21:09:16 +03:00
"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" ,
2024-09-24 13:56:58 +08:00
"enum" : [[ "user" ], [ "admin" ], [ "superadmin" ], [ "Demo" ]],
2024-08-30 21:09:16 +03:00
"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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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-09-24 13:56:58 +08:00
"/auth/user/{userId}" : {
2024-08-12 21:39:10 +03:00
"put" : {
"tags" : [ "auth" ],
2024-09-24 13:56:58 +08:00
"description" : "Change user information" ,
"parameters" : [
{
"name" : "userId" ,
"in" : "path" ,
"required" : true ,
"schema" : {
"type" : "string"
2024-08-12 21:39:10 +03:00
}
2024-09-24 13:56:58 +08:00
}
],
"requestBody" : {
"required" : true ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/UserUpdateRequest"
2024-08-13 00:14:29 +03:00
}
2024-08-12 21:39:10 +03:00
}
}
2024-09-24 13:56:58 +08:00
},
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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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-09-24 14:58:46 +08:00
},
"security" : [
{
"bearerAuth" : []
}
]
},
"delete" : {
2024-08-12 21:39:10 +03:00
"tags" : [ "auth" ],
2024-09-24 14:58:46 +08:00
"description" : "Delete user" ,
"parameters" : [
{
"name" : "userId" ,
"in" : "path" ,
"required" : true ,
"schema" : {
"type" : "string"
}
}
],
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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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-09-24 14:58:46 +08:00
},
"security" : [
{
"bearerAuth" : []
}
]
2024-08-12 21:39:10 +03:00
}
},
2024-09-24 14:58:46 +08:00
"/auth/users/superadmin" : {
"get" : {
2024-08-12 21:39:10 +03:00
"tags" : [ "auth" ],
2024-09-24 14:58:46 +08:00
"description" : "Checks to see if an admin account exists" ,
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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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-09-24 14:58:46 +08:00
},
"security" : [
{
"bearerAuth" : []
}
]
2024-08-12 21:39:10 +03:00
}
},
2024-09-24 14:58:46 +08:00
"/auth/users" : {
"get" : {
2024-08-12 21:39:10 +03:00
"tags" : [ "auth" ],
2024-09-24 14:58:46 +08:00
"description" : "Get all users" ,
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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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-09-24 14:58:46 +08:00
},
"security" : [
{
"bearerAuth" : []
}
]
2024-08-12 21:39:10 +03:00
}
},
"/auth/recovery/request" : {
"post" : {
"tags" : [ "auth" ],
"description" : "Request a recovery token" ,
2024-09-24 14:58:46 +08:00
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"required" : [ "email" ],
"properties" : {
"email" : {
"type" : "string" ,
"format" : "email"
}
}
}
}
}
},
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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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" ,
2024-09-24 14:58:46 +08:00
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"required" : [ "recoveryToken" ],
"properties" : {
"recoveryToken" : {
"type" : "string"
}
}
}
}
}
},
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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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" ,
2024-09-24 14:58:46 +08:00
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"required" : [ "recoveryToken" , "password" ],
"properties" : {
"recoveryToken" : {
"type" : "string"
},
"password" : {
"type" : "string"
}
}
}
}
}
},
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-09-24 14:58:46 +08:00
"$ref" : "#/components/schemas/SuccessResponse"
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-13 00:14:29 +03:00
},
"components" : {
2024-09-24 13:56:58 +08:00
"securitySchemes" : {
"bearerAuth" : {
"type" : "http" ,
"scheme" : "bearer" ,
"bearerFormat" : "JWT"
}
},
2024-08-13 00:14:29 +03:00
"schemas" : {
"ErrorResponse" : {
"type" : "object" ,
"properties" : {
"success" : {
2024-09-24 13:56:58 +08:00
"type" : "boolean" ,
"default" : false
2024-08-13 00:14:29 +03:00
},
"msg" : {
"type" : "string"
}
}
},
"SuccessResponse" : {
"type" : "object" ,
"properties" : {
"success" : {
2024-09-24 14:58:46 +08:00
"type" : "boolean" ,
"default" : true
2024-08-13 00:14:29 +03:00
},
"msg" : {
"type" : "string"
},
"data" : {
"type" : "object"
}
}
2024-08-18 20:01:34 +03:00
},
2024-09-24 13:56:58 +08:00
"UserUpdateRequest" : {
"type" : "object" ,
"required" : [
"firstName" ,
"lastName" ,
"email" ,
"password" ,
"role" ,
"teamId"
],
"properties" : {
"firstName" : {
"type" : "string"
},
"lastName" : {
"type" : "string"
},
"password" : {
"type" : "string" ,
"format" : "password"
},
"newPassword" : {
"type" : "string" ,
"format" : "password"
},
"profileImage" : {
"type" : "file" ,
"format" : "file"
},
"role" : {
"type" : "array" ,
"enum" : [[ "user" ], [ "admin" ], [ "superadmin" ], [ "Demo" ]],
"default" : [ "superadmin" ]
},
"deleteProfileImage" : {
"type" : "boolean"
}
}
2024-08-13 00:14:29 +03:00
}
}
2024-08-12 21:39:10 +03:00
}
2024-08-11 16:15:30 +03:00
}