server/openapi.json
Rama develop · réplica de lectura del repositorio original.
{
"openapi": "3.0.0",
"info": {
"title": "Checkmate API",
"version": "1.0.0",
"description": "Generated from Zod validation schemas. Source of truth: server/src/api/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, Rocket.Chat, 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": "proxies",
"description": "Outbound proxy servers for routing HTTP monitor checks, team-scoped with an instance-wide admin listing."
},
{
"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)."
},
{
"name": "tags",
"description": "Labels for grouping and filtering monitors, team-scoped."
},
{
"name": "egress",
"description": "The instance's outbound connectivity self-check state."
},
{
"name": "heartbeat",
"description": "Unauthenticated ping endpoints for heartbeat (dead man's switch) monitors, addressed by token."
},
{
"name": "connect",
"description": "Checkmate Connect enrollment and remote access for this installation (admin to view, superadmin to change)."
}
],
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
},
"schemas": {
"Tag": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"teamId": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["id", "teamId", "name", "color", "createdAt", "updatedAt"]
},
"Error": {
"type": "object",
"properties": {
"status": {
"type": "number"
},
"msg": {
"type": "string"
}
},
"required": ["status", "msg"]
},
"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",
"isActive": true,
"isVerified": true,
"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"
},
"avatarImage": {
"type": "string"
},
"isActive": {
"type": "boolean"
},
"isVerified": {
"type": "boolean"
},
"role": {
"type": "array",
"items": {
"type": "string",
"enum": ["user", "admin", "superadmin", "demo"]
}
},
"teamId": {
"type": "string"
},
"checkTTL": {
"type": "number"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["id", "firstName", "lastName", "email", "isActive", "isVerified", "role", "teamId", "createdAt", "updatedAt"],
"example": {
"id": "65f1c2a4d8b9e0123456789a",
"firstName": "Ada",
"lastName": "Lovelace",
"email": "ada@example.com",
"isActive": true,
"isVerified": true,
"role": ["admin"],
"teamId": "65f1c2a4d8b9e01234567890",
"createdAt": "2026-04-01T10:00:00.000Z",
"updatedAt": "2026-04-15T14:30:00.000Z"
}
},
"Check": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"monitorId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
}
},
"required": ["monitorId", "teamId", "type"]
},
"status": {
"type": "boolean"
},
"responseTime": {
"type": "number"
},
"timings": {
"type": "object",
"properties": {
"start": {
"type": "number"
},
"socket": {
"type": "number"
},
"lookup": {
"type": "number"
},
"connect": {
"type": "number"
},
"secureConnect": {
"type": "number"
},
"upload": {
"type": "number"
},
"response": {
"type": "number"
},
"end": {
"type": "number"
},
"phases": {
"type": "object",
"properties": {
"wait": {
"type": "number"
},
"dns": {
"type": "number"
},
"tcp": {
"type": "number"
},
"tls": {
"type": "number"
},
"request": {
"type": "number"
},
"firstByte": {
"type": "number"
},
"download": {
"type": "number"
},
"total": {
"type": "number"
}
}
}
},
"required": ["start", "phases"]
},
"statusCode": {
"type": "number"
},
"message": {
"type": "string"
},
"cpu": {
"type": "object",
"properties": {
"physical_core": {
"type": "number"
},
"logical_core": {
"type": "number"
},
"frequency": {
"type": "number"
},
"current_frequency": {
"type": "number"
},
"temperature": {
"type": "array",
"items": {
"type": "number"
}
},
"free_percent": {
"type": "number"
},
"usage_percent": {
"type": "number"
}
}
},
"memory": {
"type": "object",
"properties": {
"total_bytes": {
"type": "number"
},
"available_bytes": {
"type": "number"
},
"used_bytes": {
"type": "number"
},
"usage_percent": {
"type": "number"
}
}
},
"disk": {
"type": "array",
"items": {
"type": "object",
"properties": {
"device": {
"type": "string"
},
"mountpoint": {
"type": "string"
},
"total_bytes": {
"type": "number"
},
"free_bytes": {
"type": "number"
},
"used_bytes": {
"type": "number"
},
"usage_percent": {
"type": "number"
},
"total_inodes": {
"type": "number"
},
"free_inodes": {
"type": "number"
},
"used_inodes": {
"type": "number"
},
"inodes_usage_percent": {
"type": "number"
},
"read_bytes": {
"type": "number"
},
"write_bytes": {
"type": "number"
},
"read_time": {
"type": "number"
},
"write_time": {
"type": "number"
}
}
}
},
"host": {
"type": "object",
"properties": {
"os": {
"type": "string"
},
"platform": {
"type": "string"
},
"kernel_version": {
"type": "string"
},
"pretty_name": {
"type": "string"
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"metric": {
"type": "array",
"items": {
"type": "string"
}
},
"err": {
"type": "string"
}
},
"required": ["metric", "err"]
}
},
"capture": {
"type": "object",
"properties": {
"version": {
"type": "string"
},
"mode": {
"type": "string"
}
}
},
"containers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DockerContainer"
}
},
"containerSummary": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"running": {
"type": "number"
},
"stopped": {
"type": "number"
},
"unhealthy": {
"type": "number"
}
},
"required": ["total", "running", "stopped", "unhealthy"]
},
"net": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"bytes_sent": {
"type": "number"
},
"bytes_recv": {
"type": "number"
},
"packets_sent": {
"type": "number"
},
"packets_recv": {
"type": "number"
},
"err_in": {
"type": "number"
},
"err_out": {
"type": "number"
},
"drop_in": {
"type": "number"
},
"drop_out": {
"type": "number"
},
"fifo_in": {
"type": "number"
},
"fifo_out": {
"type": "number"
}
},
"required": [
"name",
"bytes_sent",
"bytes_recv",
"packets_sent",
"packets_recv",
"err_in",
"err_out",
"drop_in",
"drop_out",
"fifo_in",
"fifo_out"
]
}
},
"accessibility": {
"type": "number"
},
"bestPractices": {
"type": "number"
},
"seo": {
"type": "number"
},
"performance": {
"type": "number"
},
"audits": {
"type": "object",
"properties": {
"cls": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"si": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"fcp": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"lcp": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"tbt": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
}
}
},
"egressStatus": {
"type": "string",
"enum": ["ok", "degraded"]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["id", "metadata", "status", "responseTime", "statusCode", "message", "createdAt", "updatedAt"]
},
"DockerContainer": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"image": {
"type": "string"
},
"state": {
"type": "string",
"enum": ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
},
"status": {
"type": "string"
},
"health": {
"type": "string",
"enum": ["healthy", "unhealthy", "starting", "none"]
},
"cpuPct": {
"type": "number"
},
"memoryUsedBytes": {
"type": "number"
},
"memoryLimitBytes": {
"type": "number"
},
"memoryPct": {
"type": "number"
},
"restartCount": {
"type": "number"
},
"startedAt": {
"type": "string"
},
"ports": {
"type": "array",
"items": {
"type": "object",
"properties": {
"privatePort": {
"type": "number"
},
"protocol": {
"type": "string",
"enum": ["tcp", "udp", "sctp"]
},
"publicPort": {
"type": "number"
},
"hostIp": {
"type": "string"
}
},
"required": ["privatePort", "protocol"]
}
},
"mounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"name": {
"type": "string"
},
"source": {
"type": "string"
},
"destination": {
"type": "string"
},
"mode": {
"type": "string"
},
"rw": {
"type": "boolean"
}
},
"required": ["type", "source", "destination", "mode", "rw"]
}
},
"exitCode": {
"type": "number"
}
},
"required": ["id", "name", "image", "state", "status", "health"]
},
"Diagnostics": {
"type": "object",
"properties": {
"osStats": {
"type": "object",
"properties": {
"totalMemoryBytes": {
"type": "number"
}
},
"required": ["totalMemoryBytes"]
},
"cpuUsage": {
"type": "object",
"properties": {
"usagePercentage": {
"type": "number",
"description": "Process CPU usage as a fraction of one core (0.25 = 25%)"
}
},
"required": ["usagePercentage"]
},
"v8HeapStats": {
"type": "object",
"properties": {
"totalHeapSizeBytes": {
"type": "number"
},
"usedHeapSizeBytes": {
"type": "number"
},
"heapSizeLimitBytes": {
"type": "number"
}
},
"required": ["totalHeapSizeBytes", "usedHeapSizeBytes", "heapSizeLimitBytes"]
},
"eventLoopDelayMs": {
"type": "number"
},
"uptimeMs": {
"type": "number"
},
"mongoStats": {
"type": "object",
"properties": {
"readyState": {
"type": "number"
},
"readsPerSecond": {
"type": "number"
},
"insertsPerSecond": {
"type": "number"
},
"updatesPerSecond": {
"type": "number"
},
"deletesPerSecond": {
"type": "number"
},
"writesPerSecond": {
"type": "number"
},
"host": {
"type": "string"
},
"port": {
"type": "number"
},
"dbName": {
"type": "string"
},
"totalSize": {
"type": "number"
},
"collections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"documentCount": {
"type": "number"
},
"storageSize": {
"type": "number"
},
"totalIndexSize": {
"type": "number"
},
"totalSize": {
"type": "number"
},
"bucketCount": {
"type": "number"
}
},
"required": ["name", "documentCount", "storageSize", "totalIndexSize", "totalSize"]
}
}
},
"required": [
"readyState",
"readsPerSecond",
"insertsPerSecond",
"updatesPerSecond",
"deletesPerSecond",
"writesPerSecond",
"host",
"port",
"dbName",
"totalSize",
"collections"
]
}
},
"required": ["osStats", "cpuUsage", "v8HeapStats", "eventLoopDelayMs", "uptimeMs", "mongoStats"]
},
"FlatGeoCheck": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"monitorId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
},
"location": {
"type": "object",
"properties": {
"continent": {
"type": "string",
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
},
"region": {
"type": "string"
},
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"city": {
"type": "string"
},
"longitude": {
"type": "number"
},
"latitude": {
"type": "number"
}
},
"required": ["continent", "region", "country", "state", "city", "longitude", "latitude"]
},
"status": {
"type": "boolean"
},
"statusCode": {
"type": "number"
},
"timings": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"dns": {
"type": "number"
},
"tcp": {
"type": "number"
},
"tls": {
"type": "number"
},
"firstByte": {
"type": "number"
},
"download": {
"type": "number"
}
},
"required": ["total", "dns", "tcp", "tls", "firstByte", "download"]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["id", "monitorId", "teamId", "type", "location", "status", "statusCode", "timings", "createdAt", "updatedAt"]
},
"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",
"message",
"statusCode",
"resolutionType",
"resolvedBy",
"resolvedByEmail",
"comment",
"createdAt",
"updatedAt"
]
},
"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"
},
"userId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"method": {
"type": "string",
"enum": ["GET", "HEAD"]
},
"status": {
"type": "string",
"enum": ["up", "down", "paused", "initializing", "maintenance", "breached"]
},
"statusWindow": {
"type": "array",
"items": {
"type": "boolean"
}
},
"statusWindowSize": {
"type": "number"
},
"statusWindowThreshold": {
"type": "number"
},
"type": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
},
"ignoreTlsErrors": {
"type": "boolean"
},
"proxyMode": {
"type": "string",
"enum": ["inherit", "none", "custom"]
},
"proxyId": {
"type": "string"
},
"useAdvancedMatching": {
"type": "boolean"
},
"jsonPath": {
"type": "string"
},
"expectedValue": {
"type": "string"
},
"matchMethod": {
"anyOf": [
{
"type": "string",
"enum": ["equal", "include", "regex"]
},
{
"type": "string",
"enum": [""]
}
]
},
"url": {
"type": "string"
},
"port": {
"type": "number"
},
"isActive": {
"type": "boolean"
},
"interval": {
"type": "number"
},
"uptimePercentage": {
"type": "number"
},
"notifications": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"customUpCodes": {
"type": "array",
"items": {
"type": "number"
}
},
"secret": {
"type": "string"
},
"heartbeatSlug": {
"type": "string"
},
"cpuAlertThreshold": {
"type": "number"
},
"cpuAlertCounter": {
"type": "number"
},
"memoryAlertThreshold": {
"type": "number"
},
"memoryAlertCounter": {
"type": "number"
},
"diskAlertThreshold": {
"type": "number"
},
"diskAlertCounter": {
"type": "number"
},
"tempAlertThreshold": {
"type": "number"
},
"tempAlertCounter": {
"type": "number"
},
"selectedDisks": {
"type": "array",
"items": {
"type": "string"
}
},
"gameId": {
"type": "string"
},
"grpcServiceName": {
"type": "string"
},
"strategy": {
"type": "string",
"enum": ["desktop", "mobile"]
},
"group": {
"type": "string",
"nullable": true
},
"geoCheckEnabled": {
"type": "boolean"
},
"geoCheckLocations": {
"type": "array",
"items": {
"type": "string",
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
}
},
"geoCheckInterval": {
"type": "number"
},
"dockerLogsEnabled": {
"type": "boolean"
},
"dockerAlertOnStopped": {
"type": "boolean"
},
"dockerAlertOnUnhealthy": {
"type": "boolean"
},
"dockerTlsCa": {
"type": "string"
},
"dockerTlsCert": {
"type": "string"
},
"dockerTlsKeySet": {
"type": "boolean"
},
"dnsServer": {
"type": "string"
},
"dnsRecordType": {
"type": "string",
"enum": ["A", "AAAA", "CNAME", "MX", "TXT", "NS"]
},
"recentChecks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "boolean"
},
"responseTime": {
"type": "number"
},
"statusCode": {
"type": "number"
},
"message": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"accessibility": {
"type": "number"
},
"bestPractices": {
"type": "number"
},
"seo": {
"type": "number"
},
"performance": {
"type": "number"
},
"audits": {
"type": "object",
"properties": {
"cls": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"si": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"fcp": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"lcp": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"tbt": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
}
}
},
"cpu": {
"type": "object",
"properties": {
"physical_core": {
"type": "number"
},
"logical_core": {
"type": "number"
},
"frequency": {
"type": "number"
},
"current_frequency": {
"type": "number"
},
"temperature": {
"type": "array",
"items": {
"type": "number"
}
},
"usage_percent": {
"type": "number"
}
}
},
"memory": {
"type": "object",
"properties": {
"total_bytes": {
"type": "number"
},
"used_bytes": {
"type": "number"
},
"usage_percent": {
"type": "number"
}
}
},
"disk": {
"type": "array",
"items": {
"type": "object",
"properties": {
"device": {
"type": "string"
},
"total_bytes": {
"type": "number"
},
"used_bytes": {
"type": "number"
},
"usage_percent": {
"type": "number"
}
}
}
},
"host": {
"type": "object",
"properties": {
"os": {
"type": "string"
},
"platform": {
"type": "string"
},
"pretty_name": {
"type": "string"
}
}
},
"containerSummary": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"running": {
"type": "number"
},
"stopped": {
"type": "number"
},
"unhealthy": {
"type": "number"
}
},
"required": ["total", "running", "stopped", "unhealthy"]
}
},
"required": ["id", "status", "responseTime", "statusCode", "message", "createdAt"]
}
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"lastEvaluatedAt": {
"type": "number"
}
},
"required": [
"id",
"userId",
"teamId",
"name",
"method",
"status",
"statusWindow",
"statusWindowSize",
"statusWindowThreshold",
"type",
"ignoreTlsErrors",
"proxyMode",
"useAdvancedMatching",
"url",
"isActive",
"interval",
"notifications",
"tags",
"customUpCodes",
"cpuAlertThreshold",
"cpuAlertCounter",
"memoryAlertThreshold",
"memoryAlertCounter",
"diskAlertThreshold",
"diskAlertCounter",
"tempAlertThreshold",
"tempAlertCounter",
"selectedDisks",
"group",
"recentChecks",
"createdAt",
"updatedAt",
"lastEvaluatedAt"
],
"example": {
"id": "65f1c2a4d8b9e0123456789a",
"name": "Marketing site",
"description": "Production marketing site monitored from the EU region",
"type": "http",
"method": "GET",
"url": "https://www.example.com",
"port": 443,
"isActive": true,
"interval": 60000,
"status": "up",
"statusWindow": [true, true, true, true, true],
"statusWindowSize": 5,
"statusWindowThreshold": 3,
"ignoreTlsErrors": false,
"proxyMode": "inherit",
"useAdvancedMatching": false,
"notifications": ["65f1c2a4d8b9e0123456789b"],
"tags": [],
"customUpCodes": [],
"cpuAlertThreshold": 90,
"cpuAlertCounter": 0,
"memoryAlertThreshold": 90,
"memoryAlertCounter": 0,
"diskAlertThreshold": 90,
"diskAlertCounter": 0,
"tempAlertThreshold": 80,
"tempAlertCounter": 0,
"selectedDisks": [],
"group": null,
"geoCheckEnabled": false,
"geoCheckLocations": [],
"geoCheckInterval": 300000,
"recentChecks": [],
"teamId": "65f1c2a4d8b9e01234567890",
"userId": "65f1c2a4d8b9e01234567891",
"createdAt": "2026-04-01T10:00:00.000Z",
"updatedAt": "2026-04-15T14:30:00.000Z",
"lastEvaluatedAt": 1776254400000
}
},
"Invite": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string"
},
"teamId": {
"type": "string"
},
"role": {
"type": "array",
"items": {
"type": "string",
"enum": ["user", "admin", "superadmin", "demo"]
}
},
"token": {
"type": "string"
},
"expiry": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["id", "email", "teamId", "role", "token", "expiry", "createdAt", "updatedAt"]
},
"MaintenanceWindow": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"monitorIds": {
"type": "array",
"items": {
"type": "string"
}
},
"teamId": {
"type": "string"
},
"active": {
"type": "boolean"
},
"name": {
"type": "string"
},
"duration": {
"type": "number"
},
"durationUnit": {
"type": "string",
"enum": ["seconds", "minutes", "hours", "days"]
},
"repeat": {
"type": "number"
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["id", "monitorIds", "teamId", "active", "name", "duration", "durationUnit", "repeat", "start", "end", "createdAt", "updatedAt"]
},
"MonitorsDashboard": {
"type": "object",
"properties": {
"summary": {
"type": "object",
"properties": {
"totalMonitors": {
"type": "number"
},
"upMonitors": {
"type": "number"
},
"downMonitors": {
"type": "number"
},
"pausedMonitors": {
"type": "number"
},
"initializingMonitors": {
"type": "number"
},
"maintenanceMonitors": {
"type": "number"
},
"breachedMonitors": {
"type": "number"
}
},
"required": [
"totalMonitors",
"upMonitors",
"downMonitors",
"pausedMonitors",
"initializingMonitors",
"maintenanceMonitors",
"breachedMonitors"
]
},
"byType": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
},
"count": {
"type": "number"
}
},
"required": ["type", "count"]
}
},
"down": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
},
"status": {
"type": "string",
"enum": ["up", "down", "paused", "initializing", "maintenance", "breached"]
},
"uptimePercentage": {
"type": "number"
},
"lastCheckTimestamp": {
"type": "number"
}
},
"required": ["id", "name", "url", "type", "status"]
}
},
"uptime": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
},
"status": {
"type": "string",
"enum": ["up", "down", "paused", "initializing", "maintenance", "breached"]
},
"uptimePercentage": {
"type": "number"
},
"lastCheckTimestamp": {
"type": "number"
}
},
"required": ["id", "name", "url", "type", "status"]
}
}
},
"required": ["summary", "byType", "down", "uptime"]
},
"UptimeDetails": {
"type": "object",
"properties": {
"monitorData": {
"type": "object",
"properties": {
"monitor": {
"$ref": "#/components/schemas/Monitor"
},
"groupedChecks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bucketDate": {
"type": "string"
},
"avgResponseTime": {
"type": "number"
},
"totalChecks": {
"type": "number"
},
"avgDns": {
"type": "number"
},
"avgTcp": {
"type": "number"
},
"avgTls": {
"type": "number"
},
"avgRequest": {
"type": "number"
},
"avgFirstByte": {
"type": "number"
},
"avgDownload": {
"type": "number"
}
},
"required": [
"bucketDate",
"avgResponseTime",
"totalChecks",
"avgDns",
"avgTcp",
"avgTls",
"avgRequest",
"avgFirstByte",
"avgDownload"
]
}
},
"groupedUpChecks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bucketDate": {
"type": "string"
},
"avgResponseTime": {
"type": "number"
},
"totalChecks": {
"type": "number"
}
},
"required": ["bucketDate", "avgResponseTime", "totalChecks"]
}
},
"groupedDownChecks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bucketDate": {
"type": "string"
},
"avgResponseTime": {
"type": "number"
},
"totalChecks": {
"type": "number"
}
},
"required": ["bucketDate", "avgResponseTime", "totalChecks"]
}
},
"groupedAvgResponseTime": {
"type": "number"
},
"groupedUptimePercentage": {
"type": "number"
}
},
"required": ["monitor", "groupedChecks", "groupedUpChecks", "groupedDownChecks", "groupedAvgResponseTime", "groupedUptimePercentage"]
},
"monitorStats": {
"anyOf": [
{
"$ref": "#/components/schemas/MonitorStats"
},
{
"nullable": true
}
]
}
},
"required": ["monitorData", "monitorStats"]
},
"MonitorStats": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"monitorId": {
"type": "string"
},
"avgResponseTime": {
"type": "number"
},
"maxResponseTime": {
"type": "number"
},
"totalChecks": {
"type": "number"
},
"totalUpChecks": {
"type": "number"
},
"totalDownChecks": {
"type": "number"
},
"uptimePercentage": {
"type": "number"
},
"lastCheckTimestamp": {
"type": "number"
},
"lastResponseTime": {
"type": "number"
},
"timeOfLastFailure": {
"type": "number"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"monitorId",
"avgResponseTime",
"maxResponseTime",
"totalChecks",
"totalUpChecks",
"totalDownChecks",
"uptimePercentage",
"lastCheckTimestamp",
"lastResponseTime",
"createdAt",
"updatedAt"
]
},
"HardwareDetails": {
"type": "object",
"properties": {
"monitor": {
"$ref": "#/components/schemas/Monitor"
},
"stats": {
"type": "object",
"properties": {
"aggregateData": {
"type": "object",
"properties": {
"totalChecks": {
"type": "number"
}
},
"required": ["totalChecks"]
},
"upChecks": {
"type": "object",
"properties": {
"totalChecks": {
"type": "number"
}
},
"required": ["totalChecks"]
},
"checks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bucketDate": {
"type": "string"
},
"avgCpuUsage": {
"type": "number"
},
"avgMemoryUsage": {
"type": "number"
},
"avgTemperature": {
"type": "array",
"items": {
"type": "number"
}
},
"disks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"readSpeed": {
"type": "number"
},
"writeSpeed": {
"type": "number"
},
"totalBytes": {
"type": "number"
},
"freeBytes": {
"type": "number"
},
"usagePercent": {
"type": "number"
}
},
"required": ["name", "readSpeed", "writeSpeed", "totalBytes", "freeBytes", "usagePercent"]
}
},
"net": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"bytesSentPerSecond": {
"type": "number"
},
"deltaBytesRecv": {
"type": "number"
},
"deltaPacketsSent": {
"type": "number"
},
"deltaPacketsRecv": {
"type": "number"
},
"deltaErrIn": {
"type": "number"
},
"deltaErrOut": {
"type": "number"
},
"deltaDropIn": {
"type": "number"
},
"deltaDropOut": {
"type": "number"
},
"deltaFifoIn": {
"type": "number"
},
"deltaFifoOut": {
"type": "number"
}
},
"required": [
"name",
"bytesSentPerSecond",
"deltaBytesRecv",
"deltaPacketsSent",
"deltaPacketsRecv",
"deltaErrIn",
"deltaErrOut",
"deltaDropIn",
"deltaDropOut",
"deltaFifoIn",
"deltaFifoOut"
]
}
}
},
"required": ["bucketDate", "avgCpuUsage", "avgMemoryUsage", "avgTemperature", "disks", "net"]
}
}
},
"required": ["aggregateData", "upChecks", "checks"]
},
"monitorStats": {
"anyOf": [
{
"$ref": "#/components/schemas/MonitorStats"
},
{
"nullable": true
}
]
}
},
"required": ["monitor", "stats", "monitorStats"]
},
"PageSpeedDetails": {
"type": "object",
"properties": {
"monitorData": {
"type": "object",
"properties": {
"monitor": {
"$ref": "#/components/schemas/Monitor"
},
"groupedChecks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bucketDate": {
"type": "string"
},
"performance": {
"type": "number"
},
"accessibility": {
"type": "number"
},
"bestPractices": {
"type": "number"
},
"seo": {
"type": "number"
}
},
"required": ["bucketDate", "performance", "accessibility", "bestPractices", "seo"]
}
}
},
"required": ["monitor", "groupedChecks"]
},
"monitorStats": {
"anyOf": [
{
"$ref": "#/components/schemas/MonitorStats"
},
{
"nullable": true
}
]
}
},
"required": ["monitorData", "monitorStats"]
},
"DockerDetails": {
"type": "object",
"properties": {
"monitor": {
"$ref": "#/components/schemas/Monitor"
},
"stats": {
"type": "object",
"properties": {
"aggregateData": {
"type": "object",
"properties": {
"totalChecks": {
"type": "number"
}
},
"required": ["totalChecks"]
},
"upChecks": {
"type": "object",
"properties": {
"totalChecks": {
"type": "number"
}
},
"required": ["totalChecks"]
},
"aggregate": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"avgResponseTime": {
"type": "number",
"nullable": true
},
"upCount": {
"type": "number"
},
"totalCount": {
"type": "number"
},
"avgRunning": {
"type": "number",
"nullable": true
},
"avgTotal": {
"type": "number",
"nullable": true
},
"avgUnhealthy": {
"type": "number",
"nullable": true
}
},
"required": ["_id", "avgResponseTime", "upCount", "totalCount", "avgRunning", "avgTotal", "avgUnhealthy"]
}
},
"latest": {
"type": "object",
"nullable": true,
"properties": {
"containers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DockerContainer"
}
},
"summary": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"running": {
"type": "number"
},
"stopped": {
"type": "number"
},
"unhealthy": {
"type": "number"
}
},
"required": ["total", "running", "stopped", "unhealthy"]
},
"checkedAt": {
"type": "string"
}
},
"required": ["containers", "checkedAt"]
}
},
"required": ["aggregateData", "upChecks", "aggregate", "latest"]
},
"monitorStats": {
"anyOf": [
{
"$ref": "#/components/schemas/MonitorStats"
},
{
"nullable": true
}
]
}
},
"required": ["monitor", "stats", "monitorStats"]
},
"DockerContainerDetails": {
"type": "object",
"properties": {
"monitor": {
"$ref": "#/components/schemas/Monitor"
},
"stats": {
"type": "object",
"properties": {
"aggregate": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"avgCpuPct": {
"type": "number",
"nullable": true
},
"avgMemoryUsedBytes": {
"type": "number",
"nullable": true
},
"avgMemoryPct": {
"type": "number",
"nullable": true
},
"minRestartCount": {
"type": "number",
"nullable": true
},
"maxRestartCount": {
"type": "number",
"nullable": true
}
},
"required": ["_id", "avgCpuPct", "avgMemoryUsedBytes", "avgMemoryPct", "minRestartCount", "maxRestartCount"]
}
},
"restartsInRange": {
"type": "number"
},
"latest": {
"type": "object",
"nullable": true,
"properties": {
"container": {
"$ref": "#/components/schemas/DockerContainer"
},
"checkedAt": {
"type": "string"
}
},
"required": ["container", "checkedAt"]
}
},
"required": ["aggregate", "restartsInRange", "latest"]
}
},
"required": ["monitor", "stats"]
},
"DockerLogPage": {
"type": "object",
"properties": {
"logs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DockerLog"
}
},
"nextCursor": {
"type": "string",
"nullable": true
}
},
"required": ["logs", "nextCursor"]
},
"DockerLog": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"monitorId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"containerId": {
"type": "string"
},
"containerName": {
"type": "string"
}
},
"required": ["monitorId", "teamId", "containerId", "containerName"]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ts": {
"type": "string"
},
"stream": {
"type": "string",
"enum": ["stdout", "stderr"]
},
"text": {
"type": "string"
}
},
"required": ["ts", "stream", "text"]
}
},
"gap": {
"type": "boolean"
},
"checkedAt": {
"type": "string"
},
"expiry": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["id", "metadata", "lines", "gap", "checkedAt", "expiry", "createdAt", "updatedAt"]
},
"Notification": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"userId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"email",
"slack",
"discord",
"webhook",
"rocket_chat",
"pager_duty",
"matrix",
"teams",
"telegram",
"pushover",
"signalgrid",
"twilio",
"ntfy"
]
},
"notificationName": {
"type": "string"
},
"address": {
"type": "string"
},
"phone": {
"type": "string"
},
"homeserverUrl": {
"type": "string"
},
"roomId": {
"type": "string"
},
"accessToken": {
"type": "string"
},
"accountSid": {
"type": "string"
},
"twilioPhoneNumber": {
"type": "string"
},
"topic": {
"type": "string"
},
"ntfyAuthType": {
"type": "string",
"enum": ["none", "token", "basic"]
},
"ntfyUsername": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["id", "userId", "teamId", "type", "notificationName", "createdAt", "updatedAt"]
},
"NotificationChannelBody": {
"oneOf": [
{
"$ref": "#/components/schemas/EmailNotification"
},
{
"$ref": "#/components/schemas/WebhookNotification"
},
{
"$ref": "#/components/schemas/RocketChatNotification"
},
{
"$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/SignalgridNotification"
},
{
"$ref": "#/components/schemas/TwilioNotification"
},
{
"$ref": "#/components/schemas/NtfyNotification"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"email": "#/components/schemas/EmailNotification",
"webhook": "#/components/schemas/WebhookNotification",
"rocket_chat": "#/components/schemas/RocketChatNotification",
"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",
"signalgrid": "#/components/schemas/SignalgridNotification",
"twilio": "#/components/schemas/TwilioNotification",
"ntfy": "#/components/schemas/NtfyNotification"
}
}
},
"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"
}
},
"RocketChatNotification": {
"type": "object",
"properties": {
"notificationName": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": ["rocket_chat"]
},
"address": {
"type": "string",
"format": "uri"
}
},
"required": ["notificationName", "type", "address"],
"example": {
"notificationName": "Rocket.Chat alerts",
"type": "rocket_chat",
"address": "https://chat.example.com/hooks/integration-id/token"
}
},
"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"
}
},
"SignalgridNotification": {
"type": "object",
"properties": {
"notificationName": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": ["signalgrid"]
},
"address": {
"type": "string",
"minLength": 1
},
"accessToken": {
"type": "string",
"minLength": 1
}
},
"required": ["notificationName", "type", "address", "accessToken"],
"example": {
"notificationName": "Signalgrid",
"type": "signalgrid",
"address": "your-channel",
"accessToken": "your-client-key"
}
},
"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"
}
},
"NtfyNotification": {
"type": "object",
"properties": {
"notificationName": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": ["ntfy"]
},
"address": {
"type": "string",
"format": "uri"
},
"topic": {
"type": "string",
"minLength": 1
},
"ntfyAuthType": {
"type": "string",
"enum": ["none", "token", "basic"]
},
"ntfyUsername": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
},
"accessToken": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
}
},
"required": ["notificationName", "type", "address", "topic"],
"example": {
"notificationName": "ntfy topic",
"type": "ntfy",
"address": "https://ntfy.sh",
"topic": "checkmate-alerts",
"ntfyAuthType": "token",
"accessToken": "tk_your-ntfy-access-token"
}
},
"Proxy": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"teamId": {
"type": "string"
},
"name": {
"type": "string"
},
"protocol": {
"type": "string",
"enum": ["http", "https"]
},
"host": {
"type": "string"
},
"port": {
"type": "number"
},
"username": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"hasPassword": {
"type": "boolean"
}
},
"required": ["id", "teamId", "name", "protocol", "host", "port", "createdAt", "updatedAt", "hasPassword"]
},
"WorkerJobsPage": {
"type": "object",
"properties": {
"jobs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"monitorId": {
"type": "string"
},
"monitorType": {
"type": "string",
"nullable": true
},
"monitorInterval": {
"type": "number",
"nullable": true
},
"monitorActive": {
"type": "boolean",
"nullable": true
},
"lockedBy": {
"type": "string",
"nullable": true
},
"lockedUntil": {
"type": "number",
"nullable": true
},
"nextScheduledAt": {
"type": "number"
},
"runCount": {
"type": "number"
},
"failCount": {
"type": "number"
},
"failReason": {
"type": "string",
"nullable": true
},
"lastFinishedAt": {
"type": "number",
"nullable": true
}
},
"required": [
"monitorId",
"monitorType",
"monitorInterval",
"monitorActive",
"lockedBy",
"lockedUntil",
"nextScheduledAt",
"runCount",
"failCount",
"failReason",
"lastFinishedAt"
]
}
},
"count": {
"type": "number"
}
},
"required": ["jobs", "count"]
},
"WorkerMetrics": {
"type": "object",
"properties": {
"jobs": {
"type": "number"
},
"activeJobs": {
"type": "number"
},
"failingJobs": {
"type": "number"
},
"jobsWithFailures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"monitorId": {
"type": "string"
},
"monitorUrl": {
"type": "string",
"nullable": true
},
"monitorType": {
"type": "string",
"nullable": true
},
"failedAt": {
"type": "number",
"nullable": true
},
"failCount": {
"type": "number"
},
"failReason": {
"type": "string",
"nullable": true
}
},
"required": ["monitorId", "monitorUrl", "monitorType", "failedAt", "failCount", "failReason"]
}
},
"totalRuns": {
"type": "number"
},
"totalFailures": {
"type": "number"
},
"dueBacklog": {
"type": "number",
"description": "Active check jobs that are due but not claimed by any worker"
},
"workers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueueWorker"
}
}
},
"required": ["jobs", "activeJobs", "failingJobs", "jobsWithFailures", "totalRuns", "totalFailures", "dueBacklog", "workers"]
},
"QueueWorker": {
"type": "object",
"properties": {
"workerId": {
"type": "string",
"description": "hostname:pid:uuid"
},
"mode": {
"type": "string",
"enum": ["primary", "worker"]
},
"processesJobs": {
"type": "boolean"
},
"lastSeenAt": {
"type": "number",
"description": "Epoch ms of the last heartbeat"
},
"egress": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": ["ok", "degraded"]
},
"checkedAt": {
"type": "number",
"description": "Epoch ms of the probe behind this verdict"
},
"degradedSince": {
"type": "number",
"nullable": true,
"description": "Epoch ms the current degraded spell began, null when ok"
},
"lastProbeResults": {
"type": "array",
"items": {
"type": "object",
"properties": {
"target": {
"type": "string"
},
"reachable": {
"type": "boolean"
},
"responseTime": {
"type": "number"
},
"message": {
"type": "string"
}
},
"required": ["target", "reachable", "responseTime"]
}
}
},
"required": ["status", "checkedAt", "degradedSince", "lastProbeResults"]
}
},
"required": ["workerId", "mode", "processesJobs", "lastSeenAt"]
},
"AppSettings": {
"type": "object",
"properties": {
"pagespeedKeySet": {
"type": "boolean"
},
"emailPasswordSet": {
"type": "boolean"
},
"globalProxy": {
"type": "object",
"nullable": true,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"host": {
"type": "string"
},
"port": {
"type": "number"
}
},
"required": ["id", "name", "host", "port"]
},
"settings": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"checkTTL": {
"type": "number"
},
"language": {
"type": "string"
},
"systemEmailHost": {
"type": "string"
},
"systemEmailPort": {
"type": "number"
},
"systemEmailAddress": {
"type": "string"
},
"systemEmailDisplayName": {
"type": "string"
},
"systemEmailUser": {
"type": "string"
},
"systemEmailConnectionHost": {
"type": "string"
},
"systemEmailTLSServername": {
"type": "string"
},
"systemEmailSecure": {
"type": "boolean"
},
"systemEmailPool": {
"type": "boolean"
},
"systemEmailIgnoreTLS": {
"type": "boolean"
},
"systemEmailRequireTLS": {
"type": "boolean"
},
"systemEmailRejectUnauthorized": {
"type": "boolean"
},
"showURL": {
"type": "boolean"
},
"singleton": {
"type": "boolean"
},
"globalThresholds": {
"type": "object",
"properties": {
"cpu": {
"type": "number"
},
"memory": {
"type": "number"
},
"disk": {
"type": "number"
},
"temperature": {
"type": "number"
}
}
},
"globalProxyEnabled": {
"type": "boolean"
},
"globalProxyId": {
"type": "string",
"nullable": true
},
"egressCheckEnabled": {
"type": "boolean"
},
"egressCheckTargets": {
"type": "array",
"items": {
"type": "string"
}
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"checkTTL",
"language",
"systemEmailSecure",
"systemEmailPool",
"systemEmailIgnoreTLS",
"systemEmailRequireTLS",
"systemEmailRejectUnauthorized",
"showURL",
"singleton",
"globalProxyEnabled",
"egressCheckEnabled",
"egressCheckTargets",
"createdAt",
"updatedAt"
]
}
},
"required": ["pagespeedKeySet", "emailPasswordSet", "globalProxy", "settings"]
},
"AppVersion": {
"type": "object",
"properties": {
"latest": {
"type": "string",
"nullable": true
},
"updateAvailable": {
"type": "boolean"
}
},
"required": ["latest", "updateAvailable"]
},
"StatusPage": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"userId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"type": {
"type": "array",
"items": {
"type": "string",
"enum": ["uptime", "infrastructure"]
}
},
"companyName": {
"type": "string"
},
"url": {
"type": "string"
},
"customDomain": {
"type": "string",
"nullable": true
},
"timezone": {
"type": "string"
},
"color": {
"type": "string"
},
"monitors": {
"type": "array",
"items": {
"type": "string"
}
},
"subMonitors": {
"type": "array",
"items": {
"type": "string"
}
},
"originalMonitors": {
"type": "array",
"items": {
"type": "string"
}
},
"logo": {
"type": "object",
"properties": {
"data": {
"type": "string"
},
"contentType": {
"type": "string"
}
},
"required": ["data", "contentType"]
},
"isPublished": {
"type": "boolean"
},
"showCharts": {
"type": "boolean"
},
"showUptimePercentage": {
"type": "boolean"
},
"showAdminLoginLink": {
"type": "boolean"
},
"showInfrastructure": {
"type": "boolean"
},
"customCSS": {
"type": "string"
},
"theme": {
"type": "string",
"enum": ["refined", "modern", "bold", "editorial", "minimal"]
},
"themeMode": {
"type": "string",
"enum": ["auto", "light", "dark"]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"userId",
"teamId",
"type",
"companyName",
"url",
"customDomain",
"color",
"monitors",
"subMonitors",
"originalMonitors",
"isPublished",
"showCharts",
"showUptimePercentage",
"showAdminLoginLink",
"showInfrastructure",
"customCSS",
"theme",
"themeMode",
"createdAt",
"updatedAt"
]
},
"PublicStatusPagePayload": {
"type": "object",
"properties": {
"statusPage": {
"$ref": "#/components/schemas/StatusPage"
},
"monitors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
},
"status": {
"type": "string",
"enum": ["up", "down", "paused", "initializing", "maintenance", "breached"]
},
"uptimePercentage": {
"type": "number"
},
"recentChecks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "boolean"
},
"responseTime": {
"type": "number"
},
"statusCode": {
"type": "number"
},
"message": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"accessibility": {
"type": "number"
},
"bestPractices": {
"type": "number"
},
"seo": {
"type": "number"
},
"performance": {
"type": "number"
},
"audits": {
"type": "object",
"properties": {
"cls": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"si": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"fcp": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"lcp": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
},
"tbt": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"score": {
"type": "number",
"nullable": true
},
"displayValue": {
"type": "string"
},
"numericValue": {
"type": "number"
},
"numericUnit": {
"type": "string"
}
}
}
}
},
"cpu": {
"type": "object",
"properties": {
"physical_core": {
"type": "number"
},
"logical_core": {
"type": "number"
},
"frequency": {
"type": "number"
},
"current_frequency": {
"type": "number"
},
"temperature": {
"type": "array",
"items": {
"type": "number"
}
},
"usage_percent": {
"type": "number"
}
}
},
"memory": {
"type": "object",
"properties": {
"total_bytes": {
"type": "number"
},
"used_bytes": {
"type": "number"
},
"usage_percent": {
"type": "number"
}
}
},
"disk": {
"type": "array",
"items": {
"type": "object",
"properties": {
"device": {
"type": "string"
},
"total_bytes": {
"type": "number"
},
"used_bytes": {
"type": "number"
},
"usage_percent": {
"type": "number"
}
}
}
},
"host": {
"type": "object",
"properties": {
"os": {
"type": "string"
},
"platform": {
"type": "string"
},
"pretty_name": {
"type": "string"
}
}
},
"containerSummary": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"running": {
"type": "number"
},
"stopped": {
"type": "number"
},
"unhealthy": {
"type": "number"
}
},
"required": ["total", "running", "stopped", "unhealthy"]
}
},
"required": ["id", "status", "responseTime", "statusCode", "message", "createdAt"]
}
},
"url": {
"type": "string"
},
"port": {
"type": "number"
},
"dailyChecks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"monitorId": {
"type": "string"
},
"date": {
"type": "string"
},
"totalChecks": {
"type": "number"
},
"upChecks": {
"type": "number"
},
"downChecks": {
"type": "number"
},
"avgResponseTime": {
"type": "number",
"nullable": true
}
},
"required": ["monitorId", "date", "totalChecks", "upChecks", "downChecks", "avgResponseTime"]
}
}
},
"required": ["id", "name", "type", "status", "recentChecks"]
}
},
"range": {
"type": "string",
"enum": ["30d", "60d", "90d"]
},
"bucketTimezone": {
"type": "string"
},
"checkTTLDays": {
"type": "number"
}
},
"required": ["statusPage", "monitors"],
"example": {
"statusPage": {
"id": "65f1c2a4d8b9e0123456789c",
"userId": "65f1c2a4d8b9e01234567891",
"teamId": "65f1c2a4d8b9e01234567890",
"type": ["uptime"],
"companyName": "Acme",
"url": "acme-status",
"customDomain": null,
"timezone": "America/Toronto",
"color": "#4169E1",
"monitors": ["65f1c2a4d8b9e0123456789a"],
"subMonitors": [],
"originalMonitors": [],
"isPublished": true,
"showCharts": true,
"showUptimePercentage": true,
"showAdminLoginLink": false,
"showInfrastructure": false,
"customCSS": "",
"theme": "refined",
"themeMode": "auto",
"createdAt": "2026-04-01T10:00:00.000Z",
"updatedAt": "2026-04-15T14:30:00.000Z"
},
"range": "90d",
"bucketTimezone": "America/Toronto",
"checkTTLDays": 30,
"monitors": [
{
"id": "65f1c2a4d8b9e0123456789a",
"name": "API",
"type": "http",
"status": "up",
"uptimePercentage": 0.9987,
"recentChecks": [],
"dailyChecks": [
{
"monitorId": "65f1c2a4d8b9e0123456789a",
"date": "2026-07-19",
"totalChecks": 2880,
"upChecks": 2877,
"downChecks": 3,
"avgResponseTime": 142
}
]
}
]
}
},
"LogEntry": {
"type": "object",
"properties": {
"level": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"message": {
"type": "string"
},
"service": {
"type": "string"
},
"details": {
"type": "object",
"additionalProperties": {
"nullable": true
}
},
"stack": {
"type": "string"
}
},
"required": ["level", "timestamp", "message"]
},
"EgressSummary": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"enum": ["ok", "degraded"]
},
"degradedSince": {
"type": "string",
"nullable": true
},
"degradedWorkers": {
"type": "number"
},
"totalWorkers": {
"type": "number"
}
},
"required": ["enabled", "status", "degradedSince", "degradedWorkers", "totalWorkers"]
},
"HeartbeatResponse": {
"type": "object",
"properties": {
"received": {
"type": "boolean"
}
},
"required": ["received"]
},
"HeartbeatKeyStatus": {
"type": "object",
"properties": {
"hasKey": {
"type": "boolean"
}
},
"required": ["hasKey"]
},
"HeartbeatKey": {
"type": "object",
"properties": {
"heartbeatKey": {
"type": "string"
}
},
"required": ["heartbeatKey"]
},
"ConnectStatus": {
"type": "object",
"properties": {
"enrolled": {
"type": "boolean"
},
"agentId": {
"type": "string",
"nullable": true
},
"connectUrl": {
"type": "string",
"nullable": true
},
"apiUrl": {
"type": "string",
"nullable": true
},
"agentVersion": {
"type": "string"
},
"remoteAccess": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": ["enabled"]
},
"tunnel": {
"$ref": "#/components/schemas/ConnectTunnelStatus"
}
},
"required": ["enrolled", "agentId", "connectUrl", "apiUrl", "agentVersion", "remoteAccess", "tunnel"]
},
"ConnectTunnelStatus": {
"type": "object",
"properties": {
"connected": {
"type": "boolean"
},
"lastConnectedAt": {
"type": "string",
"nullable": true
},
"lastError": {
"type": "string",
"nullable": true
},
"closeCode": {
"type": "number",
"nullable": true
}
},
"required": ["connected", "lastConnectedAt", "lastError", "closeCode"]
}
},
"parameters": {}
},
"paths": {
"/tags": {
"post": {
"tags": ["tags"],
"summary": "Create a tag",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"color": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{6})$"
}
},
"required": ["name"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/Tag"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "A tag with that name already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/tags/team": {
"get": {
"tags": ["tags"],
"summary": "List the team's tags",
"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/Tag"
}
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/tags/{id}": {
"get": {
"tags": ["tags"],
"summary": "Get a tag",
"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": {
"$ref": "#/components/schemas/Tag"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Tag not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"tags": ["tags"],
"summary": "Edit a tag",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"schema": {
"type": "string",
"minLength": 1
},
"required": true,
"name": "id",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"color": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{6})$"
}
},
"required": ["name"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/Tag"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Tag not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": ["tags"],
"summary": "Delete a tag",
"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"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Tag not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"]
}
}
}
},
"400": {
"description": "Invalid request, or email is required for the first user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Invite not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "File too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported file type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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",
"isActive": true,
"isVerified": true,
"role": ["admin"],
"teamId": "65f1c2a4d8b9e01234567890",
"createdAt": "2026-04-01T10:00:00.000Z",
"updatedAt": "2026-04-15T14:30:00.000Z"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "User not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"
}
}
}
},
"400": {
"description": "Invalid request, or email is not configured",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "User not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"502": {
"description": "The mail server rejected the message",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Recovery token not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"
},
"data": {
"$ref": "#/components/schemas/AuthPayload"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request, or new password cannot be the same as the old one",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Recovery token not found, or user not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"]
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden, or the target role is above the caller's",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "File too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported file type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/auth/users/{userId}": {
"get": {
"tags": ["auth"],
"summary": "Get a user by id (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"
},
"data": {
"$ref": "#/components/schemas/User"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "User not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"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"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "User not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"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"
}
}
}
},
"400": {
"description": "Invalid request, or cannot delete your own account from here, or demo user cannot be deleted",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden, or the user is not on the caller's team, or the target role is above the caller's",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "User not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "User not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"
},
"password": {
"type": "string",
"minLength": 8,
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/])[A-Za-z0-9!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/]+$"
},
"newPassword": {
"type": "string",
"minLength": 8,
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/])[A-Za-z0-9!?@#$%^&*()\\-_=+[\\]{};:'\",.~`|\\\\/]+$"
},
"deleteProfileImage": {
"type": "boolean"
},
"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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden, or incorrect current password",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "User not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "File too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported file type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"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"
}
}
}
},
"400": {
"description": "Demo user cannot be deleted",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "User not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"
},
{
"schema": {
"type": "string",
"pattern": "^[0-9a-fA-F]{24}$"
},
"required": false,
"name": "monitorId",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"totalChecks": {
"type": "number"
},
"downChecks": {
"type": "number"
},
"degradedChecks": {
"type": "number"
}
},
"required": ["totalChecks", "downChecks", "degradedChecks"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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", "degraded"]
},
"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": {
"type": "object",
"properties": {
"checksCount": {
"type": "number"
},
"checks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Check"
}
}
},
"required": ["checksCount", "checks"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"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": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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", "heartbeat", "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", "degraded"]
},
"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": {
"type": "object",
"properties": {
"checksCount": {
"type": "number"
},
"checks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Check"
}
}
},
"required": ["checksCount", "checks"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": ["checks"],
"summary": "Delete checks for a monitor (admin/superadmin)",
"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": {
"deletedCount": {
"type": "number"
}
},
"required": ["deletedCount"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/Diagnostics"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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", "heartbeat", "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", "degraded"]
},
"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": {
"type": "object",
"properties": {
"geoChecksCount": {
"type": "number"
},
"geoChecks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlatGeoCheck"
}
}
},
"required": ["geoChecksCount", "geoChecks"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": ["automatic", "manual"]
},
"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": "object",
"properties": {
"incidents": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Incident"
}
},
"count": {
"type": "number"
}
},
"required": ["incidents", "count"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/incidents/{incidentId}": {
"get": {
"tags": ["incidents"],
"summary": "Get an incident by id",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"schema": {
"type": "string",
"minLength": 1
},
"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": {
"$ref": "#/components/schemas/Monitor"
},
"user": {
"anyOf": [
{
"$ref": "#/components/schemas/User"
},
{
"nullable": true
}
]
}
},
"required": ["incident", "monitor", "user"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Incident not found, or monitor not found, or user not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/incidents/{incidentId}/resolve": {
"put": {
"tags": ["incidents"],
"summary": "Manually resolve an incident (admin/superadmin)",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"schema": {
"type": "string",
"minLength": 1
},
"required": true,
"name": "incidentId",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"comment": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/Incident"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Incident not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "Incident is already resolved",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"
}
}
}
},
"400": {
"description": "Invalid request, or invite email is required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden, or the invited role is above the caller's",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/Invite"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Invite not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/Invite"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden, or the invited role is above the caller's",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/maintenance-window": {
"post": {
"tags": ["maintenance-window"],
"summary": "Create one or more maintenance windows (admin/superadmin)",
"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",
"default": true
},
"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"
}
},
"required": ["success", "msg"]
},
"example": {
"success": true,
"msg": "OK"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden, or a monitor is not on the caller's team",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"type": "object",
"properties": {
"maintenanceWindows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
},
"maintenanceWindowCount": {
"type": "number"
}
},
"required": ["maintenanceWindows", "maintenanceWindowCount"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Maintenance window not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"tags": ["maintenance-window"],
"summary": "Edit a maintenance window (admin/superadmin)",
"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"
},
"minItems": 1
},
"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": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden, or a monitor is not on the caller's team",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Maintenance window not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": ["maintenance-window"],
"summary": "Delete a maintenance window (admin/superadmin)",
"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"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Maintenance window not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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", "heartbeat", "unknown"]
},
{
"type": "array",
"items": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
}
}
]
},
"required": false,
"name": "type",
"in": "query"
},
{
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
},
"required": false,
"name": "filter",
"in": "query"
},
{
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"required": false,
"name": "tags",
"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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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", "heartbeat", "unknown"]
},
{
"type": "array",
"items": {
"type": "string",
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket", "dns", "heartbeat", "unknown"]
}
}
]
},
"required": false,
"name": "type",
"in": "query"
},
{
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"required": false,
"name": "tags",
"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": {
"type": "object",
"properties": {
"summary": {
"type": "object",
"nullable": true,
"properties": {
"totalMonitors": {
"type": "number"
},
"upMonitors": {
"type": "number"
},
"downMonitors": {
"type": "number"
},
"pausedMonitors": {
"type": "number"
},
"initializingMonitors": {
"type": "number"
},
"maintenanceMonitors": {
"type": "number"
},
"breachedMonitors": {
"type": "number"
}
},
"required": [
"totalMonitors",
"upMonitors",
"downMonitors",
"pausedMonitors",
"initializingMonitors",
"maintenanceMonitors",
"breachedMonitors"
]
},
"count": {
"type": "number"
},
"monitors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Monitor"
}
}
},
"required": ["summary", "count", "monitors"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/team/dashboard": {
"get": {
"tags": ["monitors"],
"summary": "Get aggregate dashboard data for the caller's team",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"required": false,
"name": "limit",
"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": {
"$ref": "#/components/schemas/MonitorsDashboard"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/UptimeDetails"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request, or the monitor is not an uptime monitor",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"],
"default": "recent"
},
"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": {
"$ref": "#/components/schemas/HardwareDetails"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request, or the monitor is not a hardware monitor",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"],
"default": "recent"
},
"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": {
"$ref": "#/components/schemas/PageSpeedDetails"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request, or the monitor is not a pagespeed monitor",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/docker/details/{monitorId}": {
"get": {
"tags": ["monitors"],
"summary": "Get Docker host 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"],
"default": "recent"
},
"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": {
"$ref": "#/components/schemas/DockerDetails"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request, or the monitor is not a Docker monitor",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/docker/details/{monitorId}/containers/{containerName}": {
"get": {
"tags": ["monitors"],
"summary": "Get details for one container on a Docker host monitor",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"schema": {
"type": "string",
"minLength": 1
},
"required": true,
"name": "monitorId",
"in": "path"
},
{
"schema": {
"type": "string",
"minLength": 1
},
"required": true,
"name": "containerName",
"in": "path"
},
{
"schema": {
"type": "string",
"enum": ["recent", "hour", "day", "week", "month", "all"],
"default": "recent"
},
"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": {
"$ref": "#/components/schemas/DockerContainerDetails"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request, or the monitor is not a Docker monitor",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/docker/details/{monitorId}/containers/{containerName}/logs": {
"get": {
"tags": ["monitors"],
"summary": "Get stored log lines for one container on a Docker host monitor, newest first (admin/superadmin)",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"schema": {
"type": "string",
"minLength": 1
},
"required": true,
"name": "monitorId",
"in": "path"
},
{
"schema": {
"type": "string",
"minLength": 1
},
"required": true,
"name": "containerName",
"in": "path"
},
{
"schema": {
"type": "string",
"format": "date-time"
},
"required": false,
"name": "before",
"in": "query"
},
{
"schema": {
"type": "string",
"format": "date-time"
},
"required": false,
"name": "after",
"in": "query"
},
{
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"default": 20
},
"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/DockerLogPage"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request, or the monitor is not a Docker monitor",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"],
"default": "recent"
},
"required": false,
"name": "dateRange",
"in": "query"
},
{
"schema": {
"type": "number",
"nullable": true
},
"required": false,
"name": "numToDisplay",
"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": {
"type": "object",
"properties": {
"groupedGeoChecks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bucketDate": {
"type": "string"
},
"continent": {
"type": "string",
"enum": ["EU", "NA", "AS", "SA", "AF", "OC"]
},
"avgResponseTime": {
"type": "number"
},
"totalChecks": {
"type": "number"
},
"uptimePercentage": {
"type": "number"
}
},
"required": ["bucketDate", "continent", "avgResponseTime", "totalChecks", "uptimePercentage"]
}
}
},
"required": ["groupedGeoChecks"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/pause/{monitorId}": {
"post": {
"tags": ["monitors"],
"summary": "Toggle pause state for a monitor (admin/superadmin)",
"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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/bulk/pause": {
"post": {
"tags": ["monitors"],
"summary": "Pause or resume several monitors (admin/superadmin)",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"monitorIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"maxItems": 100
},
"pause": {
"type": "boolean"
}
},
"required": ["monitorIds", "pause"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"monitors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Monitor"
}
},
"failedCount": {
"type": "number"
}
},
"required": ["monitors", "failedCount"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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",
"nullable": true
}
},
"required": ["certificateDate"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/domain/{monitorId}": {
"get": {
"tags": ["monitors"],
"summary": "Get domain registration expiry 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": {
"domain": {
"type": "string",
"nullable": true
},
"expiryDate": {
"type": "string",
"nullable": true
}
},
"required": ["domain", "expiryDate"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/notifications": {
"patch": {
"tags": ["monitors"],
"summary": "Bulk update notifications across monitors (admin/superadmin)",
"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"]
}
}
}
},
"400": {
"description": "Invalid request, or one or more monitor or notification ids are invalid",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden, or a notification belongs to another team",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors": {
"post": {
"tags": ["monitors"],
"summary": "Create a new monitor (admin/superadmin)",
"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", "heartbeat", "unknown"]
},
"statusWindowSize": {
"type": "number",
"minimum": 1,
"maximum": 20,
"default": 5
},
"statusWindowThreshold": {
"type": "number",
"minimum": 1,
"maximum": 100,
"default": 60
},
"url": {
"type": "string",
"default": ""
},
"ignoreTlsErrors": {
"type": "boolean",
"default": false
},
"proxyMode": {
"type": "string",
"enum": ["inherit", "none", "custom"],
"default": "inherit"
},
"proxyId": {
"type": "string"
},
"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"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"customUpCodes": {
"type": "array",
"items": {
"type": "number"
},
"default": []
},
"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": [""]
}
]
},
"method": {
"type": "string",
"enum": ["GET", "HEAD"]
},
"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
},
"dockerLogsEnabled": {
"type": "boolean"
},
"dockerAlertOnStopped": {
"type": "boolean"
},
"dockerAlertOnUnhealthy": {
"type": "boolean"
},
"dockerTlsCa": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
},
"dockerTlsCert": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
},
"dockerTlsKey": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
},
"dnsServer": {
"type": "string",
"minLength": 1
},
"dnsRecordType": {
"type": "string",
"enum": ["A", "AAAA", "CNAME", "MX", "TXT", "NS"]
},
"heartbeatSlug": {
"type": "string",
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
}
},
"required": ["name", "type"]
}
}
}
},
"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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "A heartbeat monitor with this slug already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"422": {
"description": "Docker TLS credentials need ENCRYPTION_KEY set on the server",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": ["monitors"],
"summary": "Delete every monitor (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": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/demo": {
"post": {
"tags": ["monitors"],
"summary": "Insert preconfigured demo 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": {
"type": "number"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/export/json": {
"get": {
"tags": ["monitors"],
"summary": "Export all team monitors as JSON (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/Monitor"
}
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "No monitors to export",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/monitors/import/json": {
"post": {
"tags": ["monitors"],
"summary": "Import monitors from JSON (admin/superadmin)",
"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",
"heartbeat",
"unknown"
]
},
"ignoreTlsErrors": {
"type": "boolean",
"default": false
},
"proxyMode": {
"type": "string",
"enum": ["inherit", "none", "custom"],
"default": "inherit"
},
"proxyId": {
"type": "string"
},
"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": [""]
}
]
},
"method": {
"type": "string",
"enum": ["GET", "HEAD"],
"default": "GET"
},
"url": {
"type": "string",
"default": ""
},
"port": {
"type": "number"
},
"isActive": {
"type": "boolean",
"default": true
},
"interval": {
"type": "number",
"default": 60000
},
"uptimePercentage": {
"type": "number"
},
"notifications": {
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"customUpCodes": {
"type": "array",
"items": {
"type": "number"
},
"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
},
"dockerLogsEnabled": {
"type": "boolean",
"default": false
},
"dockerAlertOnStopped": {
"type": "boolean",
"default": false
},
"dockerAlertOnUnhealthy": {
"type": "boolean",
"default": false
},
"dnsServer": {
"type": "string",
"minLength": 1
},
"dnsRecordType": {
"type": "string",
"enum": ["A", "AAAA", "CNAME", "MX", "TXT", "NS"]
},
"heartbeatSlug": {
"type": "string",
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": ["name", "type"]
},
"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"
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["imported", "errors"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "A heartbeat monitor with this slug already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": "object",
"additionalProperties": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"release_year": {
"type": "number"
},
"options": {
"type": "object",
"properties": {
"port": {
"type": "number"
},
"port_query": {
"type": "number"
},
"protocol": {
"type": "string"
}
}
},
"extra": {
"type": "object",
"properties": {
"old_id": {
"type": "string"
}
}
}
},
"required": ["name"]
}
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"tags": ["monitors"],
"summary": "Edit a monitor (admin/superadmin)",
"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", "heartbeat", "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"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"customUpCodes": {
"type": "array",
"items": {
"type": "number"
}
},
"secret": {
"type": "string"
},
"ignoreTlsErrors": {
"type": "boolean"
},
"proxyMode": {
"type": "string",
"enum": ["inherit", "none", "custom"]
},
"proxyId": {
"type": "string"
},
"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": [""]
}
]
},
"method": {
"type": "string",
"enum": ["GET", "HEAD"]
},
"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
},
"dockerLogsEnabled": {
"type": "boolean"
},
"dockerAlertOnStopped": {
"type": "boolean"
},
"dockerAlertOnUnhealthy": {
"type": "boolean"
},
"dockerTlsCa": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
},
"dockerTlsCert": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
},
"dockerTlsKey": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [""]
}
]
},
"dnsServer": {
"type": "string",
"minLength": 1
},
"dnsRecordType": {
"type": "string",
"enum": ["A", "AAAA", "CNAME", "MX", "TXT", "NS"]
},
"heartbeatSlug": {
"type": "string",
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
}
}
}
}
}
},
"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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "A heartbeat monitor with this slug already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"422": {
"description": "A TLS Docker host needs a key, or a hardware monitor needs a Capture API secret, or docker TLS credentials need ENCRYPTION_KEY set on the server",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": ["monitors"],
"summary": "Delete a monitor (admin/superadmin)",
"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"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/notifications": {
"post": {
"tags": ["notifications"],
"summary": "Create a notification channel (admin/superadmin)",
"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": {
"$ref": "#/components/schemas/Notification"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/notifications/test/all": {
"post": {
"tags": ["notifications"],
"summary": "Send a test alert through every notification channel for the team (admin/superadmin)",
"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"
}
},
"required": ["success", "msg"]
},
"example": {
"success": true,
"msg": "OK"
}
}
}
},
"400": {
"description": "Invalid request, or the monitor has no notifications",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Monitor not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/notifications/test": {
"post": {
"tags": ["notifications"],
"summary": "Send a test alert through a single notification channel (admin/superadmin)",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotificationChannelBody"
}
}
}
},
"responses": {
"200": {
"description": "Send result",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"msg": {
"type": "string"
}
},
"required": ["success", "msg"]
},
"example": {
"success": true,
"msg": "Notification sent successfully"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Notification"
}
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/Notification"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Notification not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": ["notifications"],
"summary": "Delete a notification channel (admin/superadmin)",
"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"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Notification not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"tags": ["notifications"],
"summary": "Edit a notification channel (admin/superadmin)",
"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": {
"$ref": "#/components/schemas/Notification"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Notification not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/proxies": {
"post": {
"tags": ["proxies"],
"summary": "Create a proxy for the caller's team",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"protocol": {
"type": "string",
"enum": ["http", "https"]
},
"host": {
"type": "string",
"minLength": 1
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"username": {
"type": "string"
},
"password": {
"type": "string"
}
},
"required": ["name", "protocol", "host", "port"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/Proxy"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "A proxy with that name already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"get": {
"tags": ["proxies"],
"summary": "List all proxies on the instance (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/Proxy"
}
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/proxies/team": {
"get": {
"tags": ["proxies"],
"summary": "List proxies 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": {
"$ref": "#/components/schemas/Proxy"
}
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/proxies/{id}": {
"get": {
"tags": ["proxies"],
"summary": "Get a proxy 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": {
"$ref": "#/components/schemas/Proxy"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Proxy not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": ["proxies"],
"summary": "Delete a proxy 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"
}
},
"required": ["success", "msg"]
},
"example": {
"success": true,
"msg": "OK"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Proxy not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "Proxy is in use by monitors, or proxy is set as the global proxy",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"tags": ["proxies"],
"summary": "Edit a proxy by id",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"schema": {
"type": "string",
"minLength": 1
},
"required": true,
"name": "id",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"protocol": {
"type": "string",
"enum": ["http", "https"]
},
"host": {
"type": "string",
"minLength": 1
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"clearPassword": {
"type": "boolean"
},
"clearUsername": {
"type": "boolean"
}
},
"required": ["name", "protocol", "host", "port"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/Proxy"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Proxy not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "A proxy with that name already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/queue/jobs": {
"get": {
"tags": ["queue"],
"summary": "List queued monitor jobs (admin/superadmin)",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"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"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/WorkerJobsPage"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/WorkerMetrics"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/queue/all-metrics": {
"get": {
"tags": ["queue"],
"summary": "Get queue metrics across all monitors (admin/superadmin)",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"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"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [true]
},
"msg": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"jobs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"monitorId": {
"type": "string"
},
"monitorType": {
"type": "string",
"nullable": true
},
"monitorInterval": {
"type": "number",
"nullable": true
},
"monitorActive": {
"type": "boolean",
"nullable": true
},
"lockedBy": {
"type": "string",
"nullable": true
},
"lockedUntil": {
"type": "number",
"nullable": true
},
"nextScheduledAt": {
"type": "number"
},
"runCount": {
"type": "number"
},
"failCount": {
"type": "number"
},
"failReason": {
"type": "string",
"nullable": true
},
"lastFinishedAt": {
"type": "number",
"nullable": true
}
},
"required": [
"monitorId",
"monitorType",
"monitorInterval",
"monitorActive",
"lockedBy",
"lockedUntil",
"nextScheduledAt",
"runCount",
"failCount",
"failReason",
"lastFinishedAt"
]
}
},
"count": {
"type": "number"
},
"metrics": {
"$ref": "#/components/schemas/WorkerMetrics"
}
},
"required": ["jobs", "count", "metrics"]
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/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": {
"$ref": "#/components/schemas/AppSettings"
}
},
"required": ["success", "msg", "data"]
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"tags": ["set