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.

The List Monitors endpoint returns every monitor registered in OpsMind. Each record reflects the current configuration and last-known health state of a tracked HTTP endpoint. Use this endpoint to build dashboards, populate selection menus, or audit the full set of monitored services before running targeted status checks.

Endpoint

GET /api/v1/monitors
Every request to this endpoint must include a valid JWT issued by the OpsMind authentication service. Requests with a missing or expired token receive a 401 Unauthorized response.

Request

Headers

HeaderValueRequired
AuthorizationBearer <token>✅ Yes
Content-Typeapplication/jsonOptional

Parameters

This endpoint does not accept any query parameters or a request body.

Curl Example

curl --request GET \
  --url https://your-opsmind-host/api/v1/monitors \
  --header "Authorization: Bearer <your_jwt_token>"

Response

200 — Success

Returns a JSON envelope where data is an array of Monitor objects. An empty array is returned when no monitors have been registered yet.
success
boolean
Always true for a successful response.
data
array
Array of Monitor objects. Each element contains the fields described below.

Sample Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "url": "https://api.payments.internal/health",
      "name": "payments-service",
      "isActive": true,
      "checkInterval": 300,
      "lastStatus": "UP",
      "createdAt": "2024-11-01T08:00:00.000Z",
      "updatedAt": "2024-11-15T14:32:10.000Z"
    },
    {
      "id": 2,
      "url": "https://api.notifications.internal/ping",
      "name": "notifications-service",
      "isActive": true,
      "checkInterval": 300,
      "lastStatus": "PENDING",
      "createdAt": "2024-11-10T09:15:00.000Z",
      "updatedAt": "2024-11-10T09:15:00.000Z"
    }
  ]
}

Error Responses

401 — Unauthorized

Returned when the Authorization header is absent, malformed, or the token has expired.
{
  "success": false,
  "error": "Unauthorized"
}

500 — Internal Server Error

Returned when an unexpected error occurs while querying the database.
{
  "success": false,
  "error": "Internal server error"
}

Build docs developers (and LLMs) love