Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LENINMORENO13/OpsMind/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint targets a single monitor by its name field and executes a real-time HTTP probe against the monitor’s registered URL. The name lookup is performed with Prisma’s mode: "insensitive" option, so the match is always case-insensitive. Once the monitor is located, checker.js fires an HTTP GET with a 5-second timeout and analyzer.js derives the operational state and trend by comparing the fresh probe against the most recent existing log entry. The outcome is written to the Log table via prisma.log.create, and the resulting saved record — the Log row — is returned directly to the caller.

Endpoint

GET /api/v1/monitors/status/:site
Authorization
string
required
A valid JWT issued by the /api/v1/auth/login endpoint.
Format: Bearer <token>

Path Parameters

site
string
required
The name value assigned to the monitor at creation time. The lookup uses a case-insensitive match, so "myservice", "MyService", and "MYSERVICE" all resolve to the same monitor. Returns 404 if no monitor with that name exists.

Request

This endpoint takes no query parameters or request body.

Example

curl -X GET https://opsmind-e07b.onrender.com/api/v1/monitors/status/MyService \
  -H "Authorization: Bearer <token>"

Response

200 — Success

Returns a JSON object with a success flag and a data object containing the persisted Log record created by this health check run.
{
  "success": true,
  "data": { ... }
}
success
boolean
Always true on a successful response.
data
object
The Log record written to the database during this health check. Fields match the Log model in schema.prisma.

Sample Response

{
  "success": true,
  "data": {
    "id": 204,
    "monitorId": 7,
    "status": 200,
    "responseTime": 312,
    "error": null,
    "trend": "RECOVERED",
    "state": "UP",
    "timestamp": "2025-07-14T10:32:05.000Z"
  }
}
The site name lookup is case-insensitive"myservice", "MyService", and "MYSERVICE" all resolve to the same monitor. You don’t need to know the exact casing used when the monitor was created.

Error Responses

404 — Site Not Monitored

Returned when no monitor with the given name exists in the database.
{
  "success": false,
  "error": "Site not monitored"
}

401 — Unauthorized

Returned when the Authorization header is missing, malformed, or contains an expired or invalid JWT.
{
  "success": false,
  "error": "Unauthorized"
}

500 — Internal Server Error

Returned when an unexpected error occurs while processing the health check.
{
  "success": false,
  "error": "Error processing request"
}

Build docs developers (and LLMs) love