10891 lines
219 KiB
JSON
10891 lines
219 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "Checkmate API",
|
|
"version": "1.0.0",
|
|
"description": "Generated from Zod validation schemas. Source of truth: server/src/validation/*.ts"
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "/api/v1",
|
|
"description": "Current server"
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "auth",
|
|
"description": "Sign up, log in, password reset, and the authenticated user's profile."
|
|
},
|
|
{
|
|
"name": "monitors",
|
|
"description": "Configure and inspect monitors (HTTP, port, ping, hardware, docker, game, gRPC) for the caller's team."
|
|
},
|
|
{
|
|
"name": "checks",
|
|
"description": "Individual monitoring check results, including history, summaries, and bulk deletes."
|
|
},
|
|
{
|
|
"name": "geo-checks",
|
|
"description": "Geographic check results for monitors with multi-region probing enabled."
|
|
},
|
|
{
|
|
"name": "incidents",
|
|
"description": "Downtime incidents derived from monitor state changes, including filtering and CSV export."
|
|
},
|
|
{
|
|
"name": "notifications",
|
|
"description": "Notification channels (email, webhook, Slack, Discord, PagerDuty, Matrix, Teams, Telegram, Pushover, Twilio) and test alerts."
|
|
},
|
|
{
|
|
"name": "maintenance-window",
|
|
"description": "Scheduled maintenance windows during which monitors do not generate incidents or alerts."
|
|
},
|
|
{
|
|
"name": "status-page",
|
|
"description": "Public status pages, their configuration, and the monitors they expose."
|
|
},
|
|
{
|
|
"name": "settings",
|
|
"description": "Global application settings (admin/superadmin)."
|
|
},
|
|
{
|
|
"name": "invite",
|
|
"description": "Team invitations and accepting them."
|
|
},
|
|
{
|
|
"name": "queue",
|
|
"description": "Background job queue introspection and admin actions (admin/superadmin)."
|
|
},
|
|
{
|
|
"name": "diagnostic",
|
|
"description": "System diagnostics for the running server (admin/superadmin)."
|
|
},
|
|
{
|
|
"name": "logs",
|
|
"description": "Application logs for the running server (admin/superadmin)."
|
|
}
|
|
],
|
|
"components": {
|
|
"securitySchemes": {
|
|
"bearerAuth": {
|
|
"type": "http",
|
|
"scheme": "bearer",
|
|
"bearerFormat": "JWT"
|
|
}
|
|
},
|
|
"schemas": {
|
|
"AuthPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user": {
|
|
"$ref": "#/components/schemas/User"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["user"],
|
|
"example": {
|
|
"user": {
|
|
"_id": "65f1c2a4d8b9e0123456789a",
|
|
"firstName": "Ada",
|
|
"lastName": "Lovelace",
|
|
"email": "ada@example.com",
|
|
"role": ["admin"],
|
|
"teamId": "65f1c2a4d8b9e01234567890",
|
|
"createdAt": "2026-04-01T10:00:00.000Z",
|
|
"updatedAt": "2026-04-15T14:30:00.000Z"
|
|
},
|
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
}
|
|
},
|
|
"User": {
|
|
"type": "object",
|
|
"properties": {
|
|
"_id": {
|
|
"type": "string"
|
|
},
|
|
"firstName": {
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"teamId": {
|
|
"type": "string"
|
|
},
|
|
"profileImage": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["_id", "firstName", "lastName", "email", "role", "createdAt", "updatedAt"],
|
|
"additionalProperties": {
|
|
"nullable": true
|
|
},
|
|
"example": {
|
|
"_id": "65f1c2a4d8b9e0123456789a",
|
|
"firstName": "Ada",
|
|
"lastName": "Lovelace",
|
|
"email": "ada@example.com",
|
|
"role": ["admin"],
|
|
"teamId": "65f1c2a4d8b9e01234567890",
|
|
"createdAt": "2026-04-01T10:00:00.000Z",
|
|
"updatedAt": "2026-04-15T14:30:00.000Z"
|
|
}
|
|
},
|
|
"Incident": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"example": "65f1c2a4d8b9e0123456789c"
|
|
},
|
|
"monitorId": {
|
|
"type": "string",
|
|
"example": "65f1c2a4d8b9e0123456789a"
|
|
},
|
|
"teamId": {
|
|
"type": "string",
|
|
"example": "65f1c2a4d8b9e01234567890"
|
|
},
|
|
"startTime": {
|
|
"type": "string",
|
|
"example": "2026-04-15T03:21:00.000Z"
|
|
},
|
|
"endTime": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"example": "2026-04-15T03:34:00.000Z"
|
|
},
|
|
"status": {
|
|
"type": "boolean",
|
|
"example": true,
|
|
"description": "true = resolved, false = ongoing"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"example": "HTTP 503 from origin"
|
|
},
|
|
"statusCode": {
|
|
"type": "number",
|
|
"nullable": true,
|
|
"example": 503
|
|
},
|
|
"resolutionType": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"enum": ["automatic", "manual", null],
|
|
"example": "automatic"
|
|
},
|
|
"resolvedBy": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"resolvedByEmail": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"comment": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"example": "2026-04-15T03:21:00.000Z"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string",
|
|
"example": "2026-04-15T03:34:00.000Z"
|
|
}
|
|
},
|
|
"required": ["id", "monitorId", "teamId", "startTime", "endTime", "status", "resolutionType", "createdAt", "updatedAt"],
|
|
"additionalProperties": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"IncidentSummary": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total": {
|
|
"type": "number",
|
|
"example": 12
|
|
},
|
|
"totalActive": {
|
|
"type": "number",
|
|
"example": 1
|
|
},
|
|
"totalManualResolutions": {
|
|
"type": "number",
|
|
"example": 2
|
|
},
|
|
"totalAutomaticResolutions": {
|
|
"type": "number",
|
|
"example": 9
|
|
},
|
|
"avgResolutionTimeHours": {
|
|
"type": "number",
|
|
"example": 0.5
|
|
},
|
|
"topMonitor": {
|
|
"type": "object",
|
|
"nullable": true,
|
|
"properties": {
|
|
"monitorId": {
|
|
"type": "string",
|
|
"example": "65f1c2a4d8b9e0123456789a"
|
|
},
|
|
"monitorName": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"example": "Marketing site"
|
|
},
|
|
"incidentCount": {
|
|
"type": "number",
|
|
"example": 4
|
|
}
|
|
},
|
|
"required": ["monitorId", "monitorName", "incidentCount"]
|
|
},
|
|
"latestIncidents": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/IncidentSummaryItem"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"total",
|
|
"totalActive",
|
|
"totalManualResolutions",
|
|
"totalAutomaticResolutions",
|
|
"avgResolutionTimeHours",
|
|
"topMonitor",
|
|
"latestIncidents"
|
|
]
|
|
},
|
|
"IncidentSummaryItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"example": "65f1c2a4d8b9e0123456789c"
|
|
},
|
|
"monitorId": {
|
|
"type": "string",
|
|
"example": "65f1c2a4d8b9e0123456789a"
|
|
},
|
|
"monitorName": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"example": "Marketing site"
|
|
},
|
|
"status": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"startTime": {
|
|
"type": "string",
|
|
"example": "2026-04-15T03:21:00.000Z"
|
|
},
|
|
"endTime": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"example": "2026-04-15T03:34:00.000Z"
|
|
},
|
|
"resolutionType": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"enum": ["automatic", "manual", null],
|
|
"example": "automatic"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"example": "HTTP 503 from origin"
|
|
},
|
|
"statusCode": {
|
|
"type": "number",
|
|
"nullable": true,
|
|
"example": 503
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"example": "2026-04-15T03:21:00.000Z"
|
|
}
|
|
},
|
|
"required": ["id", "monitorId", "monitorName", "status", "startTime", "endTime", "resolutionType", "message", "statusCode", "createdAt"]
|
|
},
|
|
"Monitor": {
|
|
"type": "object",
|
|
"properties": {
|
|
"_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "number"
|
|
},
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"interval": {
|
|
"type": "number"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["up", "down", "paused", "initializing", "maintenance", "breached"]
|
|
},
|
|
"statusWindowSize": {
|
|
"type": "number"
|
|
},
|
|
"statusWindowThreshold": {
|
|
"type": "number"
|
|
},
|
|
"ignoreTlsErrors": {
|
|
"type": "boolean"
|
|
},
|
|
"useAdvancedMatching": {
|
|
"type": "boolean"
|
|
},
|
|
"jsonPath": {
|
|
"type": "string"
|
|
},
|
|
"expectedValue": {
|
|
"type": "string"
|
|
},
|
|
"matchMethod": {
|
|
"type": "string",
|
|
"enum": ["equal", "include", "regex"]
|
|
},
|
|
"notifications": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"secret": {
|
|
"type": "string"
|
|
},
|
|
"cpuAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"memoryAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"diskAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"tempAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"selectedDisks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"gameId": {
|
|
"type": "string"
|
|
},
|
|
"grpcServiceName": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"geoCheckEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"geoCheckLocations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
}
|
|
},
|
|
"geoCheckInterval": {
|
|
"type": "number"
|
|
},
|
|
"dnsServer": {
|
|
"type": "string"
|
|
},
|
|
"dnsRecordType": {
|
|
"type": "string",
|
|
"enum": ["A", "AAAA", "CNAME", "MX", "TXT", "NS"]
|
|
},
|
|
"teamId": {
|
|
"type": "string"
|
|
},
|
|
"userId": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"_id",
|
|
"name",
|
|
"type",
|
|
"url",
|
|
"isActive",
|
|
"interval",
|
|
"status",
|
|
"statusWindowSize",
|
|
"statusWindowThreshold",
|
|
"ignoreTlsErrors",
|
|
"useAdvancedMatching",
|
|
"notifications",
|
|
"cpuAlertThreshold",
|
|
"memoryAlertThreshold",
|
|
"diskAlertThreshold",
|
|
"tempAlertThreshold",
|
|
"selectedDisks",
|
|
"geoCheckEnabled",
|
|
"geoCheckLocations",
|
|
"geoCheckInterval",
|
|
"teamId",
|
|
"userId",
|
|
"createdAt",
|
|
"updatedAt"
|
|
],
|
|
"additionalProperties": {
|
|
"nullable": true
|
|
},
|
|
"example": {
|
|
"_id": "65f1c2a4d8b9e0123456789a",
|
|
"name": "Marketing site",
|
|
"description": "Production marketing site monitored from the EU region",
|
|
"type": "http",
|
|
"url": "https://www.example.com",
|
|
"port": 443,
|
|
"isActive": true,
|
|
"interval": 60000,
|
|
"status": "up",
|
|
"statusWindowSize": 5,
|
|
"statusWindowThreshold": 3,
|
|
"ignoreTlsErrors": false,
|
|
"useAdvancedMatching": false,
|
|
"notifications": ["65f1c2a4d8b9e0123456789b"],
|
|
"cpuAlertThreshold": 90,
|
|
"memoryAlertThreshold": 90,
|
|
"diskAlertThreshold": 90,
|
|
"tempAlertThreshold": 80,
|
|
"selectedDisks": [],
|
|
"geoCheckEnabled": false,
|
|
"geoCheckLocations": [],
|
|
"geoCheckInterval": 300000,
|
|
"teamId": "65f1c2a4d8b9e01234567890",
|
|
"userId": "65f1c2a4d8b9e01234567891",
|
|
"createdAt": "2026-04-01T10:00:00.000Z",
|
|
"updatedAt": "2026-04-15T14:30:00.000Z"
|
|
}
|
|
},
|
|
"NotificationChannelBody": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/EmailNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/WebhookNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/SlackNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/DiscordNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PagerDutyNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/MatrixNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/TeamsNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/TelegramNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PushoverNotification"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/TwilioNotification"
|
|
}
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "type",
|
|
"mapping": {
|
|
"email": "#/components/schemas/EmailNotification",
|
|
"webhook": "#/components/schemas/WebhookNotification",
|
|
"slack": "#/components/schemas/SlackNotification",
|
|
"discord": "#/components/schemas/DiscordNotification",
|
|
"pager_duty": "#/components/schemas/PagerDutyNotification",
|
|
"matrix": "#/components/schemas/MatrixNotification",
|
|
"teams": "#/components/schemas/TeamsNotification",
|
|
"telegram": "#/components/schemas/TelegramNotification",
|
|
"pushover": "#/components/schemas/PushoverNotification",
|
|
"twilio": "#/components/schemas/TwilioNotification"
|
|
}
|
|
}
|
|
},
|
|
"EmailNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["email"]
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"homeserverUrl": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"roomId": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"accessToken": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "address"],
|
|
"example": {
|
|
"notificationName": "Ops on-call email",
|
|
"type": "email",
|
|
"address": "alerts@example.com"
|
|
}
|
|
},
|
|
"WebhookNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["webhook"]
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"homeserverUrl": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"roomId": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"accessToken": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "address"],
|
|
"example": {
|
|
"notificationName": "Custom webhook",
|
|
"type": "webhook",
|
|
"address": "https://example.com/hooks/checkmate"
|
|
}
|
|
},
|
|
"SlackNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["slack"]
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"homeserverUrl": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"roomId": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"accessToken": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "address"],
|
|
"example": {
|
|
"notificationName": "#alerts",
|
|
"type": "slack",
|
|
"address": "https://hooks.slack.com/services/T000/B000/XXXX"
|
|
}
|
|
},
|
|
"DiscordNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["discord"]
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"homeserverUrl": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"roomId": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"accessToken": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "address"],
|
|
"example": {
|
|
"notificationName": "#status",
|
|
"type": "discord",
|
|
"address": "https://discord.com/api/webhooks/123/abc"
|
|
}
|
|
},
|
|
"PagerDutyNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["pager_duty"]
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"homeserverUrl": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"roomId": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"accessToken": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "address"],
|
|
"example": {
|
|
"notificationName": "PagerDuty primary",
|
|
"type": "pager_duty",
|
|
"address": "R01XXXXXXXXXXXXXXXXXXXXXXX"
|
|
}
|
|
},
|
|
"MatrixNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["matrix"]
|
|
},
|
|
"address": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"homeserverUrl": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"roomId": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"accessToken": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "homeserverUrl", "roomId", "accessToken"],
|
|
"example": {
|
|
"notificationName": "Matrix room",
|
|
"type": "matrix",
|
|
"homeserverUrl": "https://matrix.example.com",
|
|
"roomId": "!abc123:example.com",
|
|
"accessToken": "syt_xxx"
|
|
}
|
|
},
|
|
"TeamsNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["teams"]
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "address"],
|
|
"example": {
|
|
"notificationName": "Teams ops channel",
|
|
"type": "teams",
|
|
"address": "https://outlook.office.com/webhook/..."
|
|
}
|
|
},
|
|
"TelegramNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["telegram"]
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"accessToken": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "address", "accessToken"],
|
|
"example": {
|
|
"notificationName": "Telegram bot",
|
|
"type": "telegram",
|
|
"address": "-1001234567890",
|
|
"accessToken": "123456:ABC-DEF"
|
|
}
|
|
},
|
|
"PushoverNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["pushover"]
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"accessToken": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "address", "accessToken"],
|
|
"example": {
|
|
"notificationName": "Pushover personal",
|
|
"type": "pushover",
|
|
"address": "u1234567890abcdef",
|
|
"accessToken": "a1234567890abcdef"
|
|
}
|
|
},
|
|
"TwilioNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["twilio"]
|
|
},
|
|
"accountSid": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"accessToken": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"phone": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"twilioPhoneNumber": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["notificationName", "type", "accountSid", "accessToken", "phone", "twilioPhoneNumber"],
|
|
"example": {
|
|
"notificationName": "Twilio SMS",
|
|
"type": "twilio",
|
|
"accountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
"accessToken": "your-auth-token",
|
|
"phone": "+15551234567",
|
|
"twilioPhoneNumber": "+15557654321"
|
|
}
|
|
}
|
|
},
|
|
"parameters": {}
|
|
},
|
|
"paths": {
|
|
"/auth/register": {
|
|
"post": {
|
|
"tags": ["auth"],
|
|
"summary": "Register a new user (first user becomes superadmin)",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"firstName": {
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"pattern": "^(?=.*[\\p{L}\\p{Sc}])[\\p{L}\\p{Sc}\\s'\\-().]+$/u"
|
|
},
|
|
"lastName": {
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"pattern": "^(?=.*[\\p{L}\\p{Sc}])[\\p{L}\\p{Sc}\\s'\\-().]+$/u"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"minLength": 8,
|
|
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/])[A-Za-z0-9!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/]+$"
|
|
},
|
|
"profileImage": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
},
|
|
"inviteToken": {
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
},
|
|
"required": ["firstName", "lastName", "email", "password", "profileImage"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/AuthPayload"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/login": {
|
|
"post": {
|
|
"tags": ["auth"],
|
|
"summary": "Log in",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["email", "password"]
|
|
},
|
|
"example": {
|
|
"email": "ada@example.com",
|
|
"password": "S3cure!Passw0rd"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/AuthPayload"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK",
|
|
"data": {
|
|
"user": {
|
|
"_id": "65f1c2a4d8b9e0123456789a",
|
|
"firstName": "Ada",
|
|
"lastName": "Lovelace",
|
|
"email": "ada@example.com",
|
|
"role": ["admin"],
|
|
"teamId": "65f1c2a4d8b9e01234567890",
|
|
"createdAt": "2026-04-01T10:00:00.000Z",
|
|
"updatedAt": "2026-04-15T14:30:00.000Z"
|
|
},
|
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid credentials",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/recovery/request": {
|
|
"post": {
|
|
"tags": ["auth"],
|
|
"summary": "Request a password recovery email",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
}
|
|
},
|
|
"required": ["email"]
|
|
},
|
|
"example": {
|
|
"email": "ada@example.com"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/recovery/validate": {
|
|
"post": {
|
|
"tags": ["auth"],
|
|
"summary": "Validate a password recovery token",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"recoveryToken": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["recoveryToken"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/recovery/reset": {
|
|
"post": {
|
|
"tags": ["auth"],
|
|
"summary": "Reset password using a recovery token",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"recoveryToken": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"minLength": 8,
|
|
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/])[A-Za-z0-9!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/]+$"
|
|
},
|
|
"confirm": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["recoveryToken", "password"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/users/superadmin": {
|
|
"get": {
|
|
"tags": ["auth"],
|
|
"summary": "Check whether a superadmin user exists",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"superAdminExists": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": ["superAdminExists"]
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/users": {
|
|
"get": {
|
|
"tags": ["auth"],
|
|
"summary": "List all users (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": ["auth"],
|
|
"summary": "Create a new user (superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"firstName": {
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"pattern": "^(?=.*[\\p{L}\\p{Sc}])[\\p{L}\\p{Sc}\\s'\\-().]+$/u"
|
|
},
|
|
"lastName": {
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"pattern": "^(?=.*[\\p{L}\\p{Sc}])[\\p{L}\\p{Sc}\\s'\\-().]+$/u"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"minLength": 8,
|
|
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/])[A-Za-z0-9!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/]+$"
|
|
},
|
|
"role": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["user", "admin", "superadmin", "demo"]
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"profileImage": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
},
|
|
"required": ["firstName", "lastName", "email", "password", "role", "profileImage"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "User created",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/users/{userId}": {
|
|
"get": {
|
|
"tags": ["auth"],
|
|
"summary": "Get a user by id",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "userId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": ["auth"],
|
|
"summary": "Edit a user (superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "userId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"firstName": {
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"pattern": "^(?=.*[\\p{L}\\p{Sc}])[\\p{L}\\p{Sc}\\s'\\-().]+$/u"
|
|
},
|
|
"lastName": {
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"pattern": "^(?=.*[\\p{L}\\p{Sc}])[\\p{L}\\p{Sc}\\s'\\-().]+$/u"
|
|
},
|
|
"role": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["user", "admin", "superadmin", "demo"]
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": ["firstName", "lastName", "role"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["auth"],
|
|
"summary": "Delete a user (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "userId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/users/{userId}/password": {
|
|
"patch": {
|
|
"tags": ["auth"],
|
|
"summary": "Change a user's password (superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "userId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"type": "string",
|
|
"minLength": 8,
|
|
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/])[A-Za-z0-9!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/]+$"
|
|
}
|
|
},
|
|
"required": ["password"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/user": {
|
|
"patch": {
|
|
"tags": ["auth"],
|
|
"summary": "Edit the currently authenticated user",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"firstName": {
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"pattern": "^(?=.*[\\p{L}\\p{Sc}])[\\p{L}\\p{Sc}\\s'\\-().]+$/u"
|
|
},
|
|
"lastName": {
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"pattern": "^(?=.*[\\p{L}\\p{Sc}])[\\p{L}\\p{Sc}\\s'\\-().]+$/u"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"profilePicture": {
|
|
"type": "string"
|
|
},
|
|
"profileImage": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
},
|
|
"required": ["profileImage"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["auth"],
|
|
"summary": "Delete the currently authenticated user",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/checks/team/summary": {
|
|
"get": {
|
|
"tags": ["checks"],
|
|
"summary": "Aggregate check summary for the caller's team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"]
|
|
},
|
|
"required": false,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/checks/team": {
|
|
"get": {
|
|
"tags": ["checks"],
|
|
"summary": "List checks across the team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["asc", "desc"]
|
|
},
|
|
"required": true,
|
|
"name": "sortOrder",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"]
|
|
},
|
|
"required": true,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["all", "up", "down", "resolve"]
|
|
},
|
|
"required": false,
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "ack",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "rowsPerPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["checks"],
|
|
"summary": "Delete all checks for the team (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"deletedCount": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": ["deletedCount"]
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/checks/{monitorId}": {
|
|
"get": {
|
|
"tags": ["checks"],
|
|
"summary": "List checks for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
},
|
|
"required": false,
|
|
"name": "type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["asc", "desc"]
|
|
},
|
|
"required": true,
|
|
"name": "sortOrder",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"]
|
|
},
|
|
"required": true,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["all", "up", "down", "resolve"]
|
|
},
|
|
"required": false,
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "ack",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "rowsPerPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"required": false,
|
|
"name": "continent",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["checks"],
|
|
"summary": "Delete checks for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/diagnostic/system": {
|
|
"get": {
|
|
"tags": ["diagnostic"],
|
|
"summary": "Get system diagnostics (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/geo-checks/{monitorId}": {
|
|
"get": {
|
|
"tags": ["geo-checks"],
|
|
"summary": "Get geo check results for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
},
|
|
"required": false,
|
|
"name": "type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["asc", "desc"]
|
|
},
|
|
"required": true,
|
|
"name": "sortOrder",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"]
|
|
},
|
|
"required": true,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["all", "up", "down", "resolve"]
|
|
},
|
|
"required": false,
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "ack",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "rowsPerPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"required": false,
|
|
"name": "continent",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/incidents/team": {
|
|
"get": {
|
|
"tags": ["incidents"],
|
|
"summary": "List incidents for the caller's team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["asc", "desc"]
|
|
},
|
|
"required": true,
|
|
"name": "sortOrder",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"],
|
|
"default": "all"
|
|
},
|
|
"required": false,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true,
|
|
"minimum": 0
|
|
},
|
|
"required": false,
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"required": true,
|
|
"name": "rowsPerPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": false,
|
|
"name": "monitorId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["manual", "automatic"]
|
|
},
|
|
"required": false,
|
|
"name": "resolutionType",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Incident"
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/incidents/team/summary": {
|
|
"get": {
|
|
"tags": ["incidents"],
|
|
"summary": "Incident summary for the caller's team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"required": false,
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/IncidentSummary"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/incidents/{incidentId}": {
|
|
"get": {
|
|
"tags": ["incidents"],
|
|
"summary": "Get an incident by id",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"name": "incidentId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"incident": {
|
|
"$ref": "#/components/schemas/Incident"
|
|
},
|
|
"monitor": {
|
|
"nullable": true
|
|
},
|
|
"user": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["incident"]
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/incidents/{incidentId}/resolve": {
|
|
"put": {
|
|
"tags": ["incidents"],
|
|
"summary": "Manually resolve an incident (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"name": "incidentId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/invite/send": {
|
|
"post": {
|
|
"tags": ["invite"],
|
|
"summary": "Send an invite email (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"role": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["user", "admin", "superadmin", "demo"]
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"teamId": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["email", "role", "teamId"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/invite/verify": {
|
|
"post": {
|
|
"tags": ["invite"],
|
|
"summary": "Verify an invite token",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"token": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["token"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": ["email"],
|
|
"additionalProperties": {
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/invite": {
|
|
"post": {
|
|
"tags": ["invite"],
|
|
"summary": "Create an invite token (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"role": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["user", "admin", "superadmin", "demo"]
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"teamId": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["email", "role", "teamId"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["token"],
|
|
"additionalProperties": {
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/logs": {
|
|
"get": {
|
|
"tags": ["logs"],
|
|
"summary": "Get application logs (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/maintenance-window": {
|
|
"post": {
|
|
"tags": ["maintenance-window"],
|
|
"summary": "Create one or more maintenance windows",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"monitors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"duration": {
|
|
"type": "number",
|
|
"minimum": 1
|
|
},
|
|
"durationUnit": {
|
|
"type": "string",
|
|
"enum": ["seconds", "minutes", "hours", "days"]
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "date-time"
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "date-time"
|
|
},
|
|
"repeat": {
|
|
"type": "number",
|
|
"minimum": 0
|
|
},
|
|
"expiry": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"required": ["monitors", "name", "duration", "durationUnit", "start", "end", "repeat"],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/maintenance-window/team": {
|
|
"get": {
|
|
"tags": ["maintenance-window"],
|
|
"summary": "List maintenance windows for the caller's team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "rowsPerPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": false,
|
|
"name": "field",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["asc", "desc"]
|
|
},
|
|
"required": false,
|
|
"name": "order",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/maintenance-window/monitor/{monitorId}": {
|
|
"get": {
|
|
"tags": ["maintenance-window"],
|
|
"summary": "List maintenance windows for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/maintenance-window/{id}": {
|
|
"get": {
|
|
"tags": ["maintenance-window"],
|
|
"summary": "Get a maintenance window by id",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "id",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": ["maintenance-window"],
|
|
"summary": "Edit a maintenance window",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "id",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"repeat": {
|
|
"type": "number"
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "date-time"
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "date-time"
|
|
},
|
|
"expiry": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "date-time"
|
|
},
|
|
"monitors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"duration": {
|
|
"type": "number"
|
|
},
|
|
"durationUnit": {
|
|
"type": "string",
|
|
"enum": ["seconds", "minutes", "hours", "days"]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["maintenance-window"],
|
|
"summary": "Delete a maintenance window",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "id",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/team": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "List monitors for the caller's team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"required": false,
|
|
"name": "type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"required": false,
|
|
"name": "filter",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Monitor"
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/team/with-checks": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "List team monitors with their most recent checks (paginated)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
},
|
|
"required": false,
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true,
|
|
"minimum": 0
|
|
},
|
|
"required": false,
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
},
|
|
"required": false,
|
|
"name": "rowsPerPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"required": false,
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": false,
|
|
"name": "field",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["asc", "desc"]
|
|
},
|
|
"required": false,
|
|
"name": "order",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"required": false,
|
|
"name": "type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "explain",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/team/groups": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "List monitor groups for the caller's team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/uptime/details/{monitorId}": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "Get uptime details for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"]
|
|
},
|
|
"required": true,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "normalize",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/hardware/details/{monitorId}": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "Get hardware metrics detail for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"]
|
|
},
|
|
"required": false,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/pagespeed/details/{monitorId}": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "Get PageSpeed detail for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"]
|
|
},
|
|
"required": false,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/{monitorId}/geo-checks": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "Get geo check results for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["asc", "desc"]
|
|
},
|
|
"required": false,
|
|
"name": "sortOrder",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["recent", "hour", "day", "week", "month", "all"]
|
|
},
|
|
"required": false,
|
|
"name": "dateRange",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "numToDisplay",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"required": false,
|
|
"name": "normalize",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"required": false,
|
|
"name": "continent",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/pause/{monitorId}": {
|
|
"post": {
|
|
"tags": ["monitors"],
|
|
"summary": "Toggle pause state for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/Monitor"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/certificate/{monitorId}": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "Get SSL certificate info for a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"certificateDate": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["certificateDate"]
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/notifications": {
|
|
"patch": {
|
|
"tags": ["monitors"],
|
|
"summary": "Bulk update notifications across monitors",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"monitorIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 100
|
|
},
|
|
"notificationIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"maxItems": 100
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"enum": ["add", "remove", "set"]
|
|
}
|
|
},
|
|
"required": ["monitorIds", "notificationIds", "action"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"modifiedCount": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": ["modifiedCount"]
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors": {
|
|
"post": {
|
|
"tags": ["monitors"],
|
|
"summary": "Create a new monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
},
|
|
"statusWindowSize": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 20,
|
|
"default": 5
|
|
},
|
|
"statusWindowThreshold": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"default": 60
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"ignoreTlsErrors": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"useAdvancedMatching": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"port": {
|
|
"type": "number"
|
|
},
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"interval": {
|
|
"type": "number"
|
|
},
|
|
"cpuAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"memoryAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"diskAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"tempAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"notifications": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"secret": {
|
|
"type": "string"
|
|
},
|
|
"jsonPath": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"expectedValue": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"matchMethod": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["equal", "include", "regex"]
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"gameId": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"grpcServiceName": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
],
|
|
"default": ""
|
|
},
|
|
"strategy": {
|
|
"type": "string",
|
|
"enum": ["desktop", "mobile"]
|
|
},
|
|
"selectedDisks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"group": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
{
|
|
"nullable": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"geoCheckEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"geoCheckLocations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
}
|
|
},
|
|
"geoCheckInterval": {
|
|
"type": "number",
|
|
"minimum": 300000
|
|
},
|
|
"dnsServer": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"dnsRecordType": {
|
|
"type": "string",
|
|
"enum": ["A", "AAAA", "CNAME", "MX", "TXT", "NS"]
|
|
}
|
|
},
|
|
"required": ["name", "type", "url"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Monitor created",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/Monitor"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["monitors"],
|
|
"summary": "Delete every monitor (superadmin only)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/demo": {
|
|
"post": {
|
|
"tags": ["monitors"],
|
|
"summary": "Insert preconfigured demo monitors",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/export/json": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "Export all team monitors as JSON",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/import/json": {
|
|
"post": {
|
|
"tags": ["monitors"],
|
|
"summary": "Import monitors from JSON",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"monitors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"userId": {
|
|
"type": "string"
|
|
},
|
|
"teamId": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["up", "down", "paused", "initializing", "maintenance", "breached"],
|
|
"default": "initializing"
|
|
},
|
|
"statusWindow": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "boolean"
|
|
},
|
|
"default": []
|
|
},
|
|
"statusWindowSize": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 20,
|
|
"default": 5
|
|
},
|
|
"statusWindowThreshold": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"default": 60
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
},
|
|
"ignoreTlsErrors": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"useAdvancedMatching": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"jsonPath": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"expectedValue": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"matchMethod": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["equal", "include", "regex"]
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"port": {
|
|
"type": "number"
|
|
},
|
|
"isActive": {
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"interval": {
|
|
"type": "number",
|
|
"default": 60000
|
|
},
|
|
"uptimePercentage": {
|
|
"type": "number"
|
|
},
|
|
"notifications": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"default": []
|
|
},
|
|
"secret": {
|
|
"type": "string"
|
|
},
|
|
"cpuAlertThreshold": {
|
|
"type": "number",
|
|
"default": 100
|
|
},
|
|
"cpuAlertCounter": {
|
|
"type": "number",
|
|
"default": 5
|
|
},
|
|
"memoryAlertThreshold": {
|
|
"type": "number",
|
|
"default": 100
|
|
},
|
|
"memoryAlertCounter": {
|
|
"type": "number",
|
|
"default": 5
|
|
},
|
|
"diskAlertThreshold": {
|
|
"type": "number",
|
|
"default": 100
|
|
},
|
|
"diskAlertCounter": {
|
|
"type": "number",
|
|
"default": 5
|
|
},
|
|
"tempAlertThreshold": {
|
|
"type": "number",
|
|
"default": 100
|
|
},
|
|
"tempAlertCounter": {
|
|
"type": "number",
|
|
"default": 5
|
|
},
|
|
"selectedDisks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"default": []
|
|
},
|
|
"gameId": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"grpcServiceName": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
],
|
|
"default": ""
|
|
},
|
|
"strategy": {
|
|
"type": "string",
|
|
"enum": ["desktop", "mobile"]
|
|
},
|
|
"group": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
{
|
|
"nullable": true
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"geoCheckEnabled": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"geoCheckLocations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
},
|
|
"default": []
|
|
},
|
|
"geoCheckInterval": {
|
|
"type": "number",
|
|
"minimum": 300000,
|
|
"default": 300000
|
|
},
|
|
"dnsServer": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"dnsRecordType": {
|
|
"type": "string",
|
|
"enum": ["A", "AAAA", "CNAME", "MX", "TXT", "NS"]
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["name", "type", "url"]
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": ["monitors"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"imported": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": ["imported"],
|
|
"additionalProperties": {
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/games": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "List supported game-server types",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/monitors/{monitorId}": {
|
|
"get": {
|
|
"tags": ["monitors"],
|
|
"summary": "Get a monitor by id",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/Monitor"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": ["monitors"],
|
|
"summary": "Edit a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "unknown"]
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"statusWindowSize": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 20,
|
|
"default": 5
|
|
},
|
|
"statusWindowThreshold": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"default": 60
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"interval": {
|
|
"type": "number"
|
|
},
|
|
"notifications": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"secret": {
|
|
"type": "string"
|
|
},
|
|
"ignoreTlsErrors": {
|
|
"type": "boolean"
|
|
},
|
|
"useAdvancedMatching": {
|
|
"type": "boolean"
|
|
},
|
|
"jsonPath": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"expectedValue": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"matchMethod": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["equal", "include", "regex"]
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"port": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 65535
|
|
},
|
|
"cpuAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"memoryAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"diskAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"tempAlertThreshold": {
|
|
"type": "number"
|
|
},
|
|
"gameId": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"grpcServiceName": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"strategy": {
|
|
"type": "string",
|
|
"enum": ["desktop", "mobile"]
|
|
},
|
|
"selectedDisks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"group": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
{
|
|
"nullable": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"geoCheckEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"geoCheckLocations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
|
|
}
|
|
},
|
|
"geoCheckInterval": {
|
|
"type": "number",
|
|
"minimum": 300000
|
|
},
|
|
"dnsServer": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"dnsRecordType": {
|
|
"type": "string",
|
|
"enum": ["A", "AAAA", "CNAME", "MX", "TXT", "NS"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/Monitor"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["monitors"],
|
|
"summary": "Delete a monitor",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "monitorId",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/Monitor"
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/notifications": {
|
|
"post": {
|
|
"tags": ["notifications"],
|
|
"summary": "Create a notification channel",
|
|
"description": "Create a notification channel of any supported type. The `type` field discriminates the body shape.",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotificationChannelBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/notifications/test/all": {
|
|
"post": {
|
|
"tags": ["notifications"],
|
|
"summary": "Send a test alert through every notification channel for the team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"monitorId": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": ["monitorId"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/notifications/test": {
|
|
"post": {
|
|
"tags": ["notifications"],
|
|
"summary": "Send a test alert through a single notification channel",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotificationChannelBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": ["success"],
|
|
"additionalProperties": {
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"required": ["success", "msg", "data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/notifications/team": {
|
|
"get": {
|
|
"tags": ["notifications"],
|
|
"summary": "List notification channels for the caller's team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/notifications/{id}": {
|
|
"get": {
|
|
"tags": ["notifications"],
|
|
"summary": "Get a notification channel by id",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "id",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["notifications"],
|
|
"summary": "Delete a notification channel",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "id",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": ["notifications"],
|
|
"summary": "Edit a notification channel",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "id",
|
|
"in": "path"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotificationChannelBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/jobs": {
|
|
"get": {
|
|
"tags": ["queue"],
|
|
"summary": "List queued monitor jobs (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/metrics": {
|
|
"get": {
|
|
"tags": ["queue"],
|
|
"summary": "Get queue runtime metrics (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/all-metrics": {
|
|
"get": {
|
|
"tags": ["queue"],
|
|
"summary": "Get queue metrics across all monitors (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/flush": {
|
|
"post": {
|
|
"tags": ["queue"],
|
|
"summary": "Flush the monitor job queue (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/settings": {
|
|
"get": {
|
|
"tags": ["settings"],
|
|
"summary": "Get application settings",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": ["settings"],
|
|
"summary": "Update application settings (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"checkTTL": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 366
|
|
},
|
|
"systemEmailPort": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"pagespeedApiKey": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
},
|
|
"systemEmailHost": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"systemEmailAddress": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"systemEmailDisplayName": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"maxLength": 100
|
|
},
|
|
"systemEmailPassword": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"systemEmailUser": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"systemEmailConnectionHost": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"systemEmailTLSServername": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"showURL": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailSecure": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailPool": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailIgnoreTLS": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailRequireTLS": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailRejectUnauthorized": {
|
|
"type": "boolean"
|
|
},
|
|
"globalThresholds": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cpu": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
},
|
|
"memory": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
},
|
|
"disk": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
},
|
|
"temperature": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 150
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/settings/test-email": {
|
|
"post": {
|
|
"tags": ["settings"],
|
|
"summary": "Send a test email using current SMTP settings (admin/superadmin)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"to": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"systemEmailHost": {
|
|
"type": "string"
|
|
},
|
|
"systemEmailPort": {
|
|
"type": "number"
|
|
},
|
|
"systemEmailSecure": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailPool": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailAddress": {
|
|
"type": "string"
|
|
},
|
|
"systemEmailDisplayName": {
|
|
"type": "string"
|
|
},
|
|
"systemEmailPassword": {
|
|
"type": "string"
|
|
},
|
|
"systemEmailUser": {
|
|
"type": "string"
|
|
},
|
|
"systemEmailConnectionHost": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
},
|
|
"systemEmailIgnoreTLS": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailRequireTLS": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailRejectUnauthorized": {
|
|
"type": "boolean"
|
|
},
|
|
"systemEmailTLSServername": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": [""]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["to"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/status-page/team": {
|
|
"get": {
|
|
"tags": ["status-page"],
|
|
"summary": "List status pages for the caller's team",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/status-page": {
|
|
"post": {
|
|
"tags": ["status-page"],
|
|
"summary": "Create a status page (logo upload optional)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["uptime", "infrastructure"]
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["uptime", "infrastructure"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"companyName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"pattern": "^[a-zA-Z0-9_-]+$"
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
},
|
|
"color": {
|
|
"type": "string"
|
|
},
|
|
"monitors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-fA-F]{24}$"
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"subMonitors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-fA-F]{24}$"
|
|
}
|
|
},
|
|
"deleteSubmonitors": {
|
|
"type": "boolean"
|
|
},
|
|
"isPublished": {
|
|
"type": "boolean"
|
|
},
|
|
"showCharts": {
|
|
"type": "boolean"
|
|
},
|
|
"showUptimePercentage": {
|
|
"type": "boolean"
|
|
},
|
|
"showAdminLoginLink": {
|
|
"type": "boolean"
|
|
},
|
|
"showInfrastructure": {
|
|
"type": "boolean"
|
|
},
|
|
"removeLogo": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["true"]
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": ["false"]
|
|
}
|
|
]
|
|
},
|
|
"theme": {
|
|
"type": "string",
|
|
"enum": ["refined", "modern", "bold", "editorial"]
|
|
},
|
|
"themeMode": {
|
|
"type": "string",
|
|
"enum": ["auto", "light", "dark"]
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
},
|
|
"required": ["type", "companyName", "url", "monitors", "isPublished", "showUptimePercentage", "logo"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/status-page/{id}": {
|
|
"put": {
|
|
"tags": ["status-page"],
|
|
"summary": "Update a status page (logo upload optional)",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["uptime", "infrastructure"]
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["uptime", "infrastructure"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"companyName": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"pattern": "^[a-zA-Z0-9_-]+$"
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
},
|
|
"color": {
|
|
"type": "string"
|
|
},
|
|
"monitors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-fA-F]{24}$"
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"subMonitors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-fA-F]{24}$"
|
|
}
|
|
},
|
|
"deleteSubmonitors": {
|
|
"type": "boolean"
|
|
},
|
|
"isPublished": {
|
|
"type": "boolean"
|
|
},
|
|
"showCharts": {
|
|
"type": "boolean"
|
|
},
|
|
"showUptimePercentage": {
|
|
"type": "boolean"
|
|
},
|
|
"showAdminLoginLink": {
|
|
"type": "boolean"
|
|
},
|
|
"showInfrastructure": {
|
|
"type": "boolean"
|
|
},
|
|
"removeLogo": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["true"]
|
|
},
|
|
{
|
|
"type": "string",
|
|
"enum": ["false"]
|
|
}
|
|
]
|
|
},
|
|
"theme": {
|
|
"type": "string",
|
|
"enum": ["refined", "modern", "bold", "editorial"]
|
|
},
|
|
"themeMode": {
|
|
"type": "string",
|
|
"enum": ["auto", "light", "dark"]
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
},
|
|
"required": ["type", "companyName", "url", "monitors", "isPublished", "showUptimePercentage", "logo"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": ["status-page"],
|
|
"summary": "Delete a status page",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
},
|
|
"example": {
|
|
"success": true,
|
|
"msg": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/status-page/{url}": {
|
|
"get": {
|
|
"tags": ["status-page"],
|
|
"summary": "Get a public status page by its URL slug",
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"required": true,
|
|
"name": "url",
|
|
"in": "path"
|
|
},
|
|
{
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["uptime", "infrastructure"]
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["uptime", "infrastructure"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"required": true,
|
|
"name": "type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"schema": {
|
|
"type": "number",
|
|
"nullable": true
|
|
},
|
|
"required": false,
|
|
"name": "timeFrame",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [true]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Status page not found"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"enum": [false]
|
|
},
|
|
"msg": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["success", "msg"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|