Skip to content

Monitors API Reference

This guide provides detailed information about the Monitors API endpoints.

Authentication

All monitor endpoints require authentication using a Project API Token. Include your token in the Authorization header:

bash
Authorization: Bearer YOUR_PROJECT_API_TOKEN

For more information about authentication, see the Authentication Guide.

List Monitors

Retrieve a list of all monitors.

http
GET /api/v1/network_monitors
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X GET "https://app.uptinio.com/api/v1/network_monitors?page=1&per_page=25" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Example with search:

bash
curl -X GET "https://app.uptinio.com/api/v1/network_monitors?search=example" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Query Parameters

ParameterTypeDescriptionDefault
pageintegerPage number1
per_pageintegerItems per page (max: 100)25
sortstringSort order: status (monitors with incidents first, then successful, then paused) or created_atstatus
searchstringSearch query to filter monitors by name or URL (case-insensitive partial match)-

Response

json
{
  "data": [
    {
      "id": 1,
      "uuid": "NM123",
      "name": "Website Uptime",
      "url": "https://example.com",
      "check_type": "http",
      "status": "success",
      "uptime": 99.95,
      "response_time": 125.5,
      "last_check": "2024-01-02T12:30:00Z",
      "open_incident_uuids": ["INC123", "INC456"],
      "created_at": "2024-01-01T00:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 25,
    "total_pages": 3,
    "total_count": 67,
    "sort": "status"
  }
}

Response Fields

FieldTypeDescription
dataarrayArray of network monitor objects
data[].idintegerMonitor ID
data[].uuidstringMonitor UUID
data[].namestringMonitor name
data[].urlstringMonitor URL
data[].check_typestringType of check (http, tcp, ping, keyword, heartbeat)
data[].statusstringCurrent status (success, failure, paused, initializing)
data[].uptimefloatUptime percentage for last 24 hours (0-100)
data[].response_timefloatLast response time in milliseconds
data[].last_checkstringISO 8601 timestamp of last check
data[].open_incident_uuidsarrayArray of UUIDs for ongoing (open) incidents
data[].created_atstringISO 8601 timestamp of creation
metaobjectPagination metadata
meta.current_pageintegerCurrent page number
meta.per_pageintegerNumber of items per page
meta.total_pagesintegerTotal number of pages
meta.total_countintegerTotal number of items
meta.sortstringCurrent sort order (status or created_at)
meta.searchstring|nullSearch query used (if any)

Sorting

By default, monitors are sorted by status priority:

  1. Monitors with ongoing incidents (failure status) - highest priority
  2. Successful monitors (not paused, has transactions) - second priority
  3. Paused monitors - lowest priority

Within each priority group, monitors are sorted by created_at in descending order (newest first).

To sort by creation date only, use sort=created_at.

You can search for monitors by name or URL using the search parameter. The search is case-insensitive and performs a partial match (LIKE query).

Examples:

  • Search for monitors with "api" in name or URL: ?search=api
  • Search for monitors with "example.com" in URL: ?search=example.com
  • Combine search with pagination: ?search=test&page=1&per_page=10

The search will match monitors where either the name or url field contains the search term.

Create Monitor

Create a new monitor. The required and optional parameters vary depending on the monitor type.

http
POST /api/v1/network_monitors
Authorization: Bearer YOUR_PROJECT_API_TOKEN
Content-Type: application/json

Common Parameters

These parameters apply to all monitor types:

ParameterTypeRequiredDescriptionDefault
check_typestringYesType of monitor: http, tcp, ping, keyword, or heartbeat-
namestringNo*Descriptive name for the monitor-
minutes_intervalintegerYesHow often to check (in minutes). Must be > 0-
request_timeoutintegerNoMaximum time to wait for response (1-60 seconds)30
check_ssl_errorsbooleanNoWhether to check for SSL certificate errorstrue
domain_expiry_remindersbooleanNoWhether to send domain expiry reminderstrue
integration_uuidsarrayNoArray of integration UUIDs to notify[]

* name is required for heartbeat monitors, optional for others.

Monitor Types

HTTP Monitor

Monitors websites and APIs by making HTTP requests. Verifies response codes, latency, SSL certificates, and domain expiration.

Required Parameters:

  • check_type: "http"
  • url: Target URL (e.g., "https://example.com")
  • http_method: HTTP method ("method_get", "method_post", "method_put", "method_patch", "method_delete", "method_head")
  • minutes_interval: Check interval in minutes

Optional Parameters:

  • name: Monitor name
  • request_timeout: Timeout in seconds (1-60, default: 30)
  • check_ssl_errors: Check SSL errors (default: true)
  • domain_expiry_reminders: Send domain expiry reminders (default: true)
  • follow_redirections: Follow HTTP redirects (default: true)
  • up_http_status_codes: Array of acceptable status codes (default: ["2xx", "3xx"])
  • auth_type: Authentication type ("none", "basic", "bearer", default: "none")
  • auth_username: Username for basic/bearer auth
  • auth_password: Password/token for basic/bearer auth
  • request_body: Request body for POST/PUT/PATCH requests
  • send_as_json: Send request body as JSON (default: false)
  • integration_uuids: Array of integration UUIDs

Example:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "network_monitor": {
      "name": "My Website",
      "url": "https://example.com",
      "check_type": "http",
      "http_method": "method_get",
      "minutes_interval": 5,
      "check_ssl_errors": true,
      "follow_redirections": true,
      "up_http_status_codes": ["2xx", "3xx"]
    }
  }'

Example with Basic Authentication:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "network_monitor": {
      "name": "Protected API",
      "url": "https://api.example.com/status",
      "check_type": "http",
      "http_method": "method_get",
      "minutes_interval": 5,
      "auth_type": "basic",
      "auth_username": "user",
      "auth_password": "pass"
    }
  }'

Example with POST Request:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "network_monitor": {
      "name": "API Endpoint",
      "url": "https://api.example.com/webhook",
      "check_type": "http",
      "http_method": "method_post",
      "minutes_interval": 10,
      "request_body": "{\"test\": true}",
      "send_as_json": true
    }
  }'

TCP Port Monitor

Checks if a specific network port is open and accessible. Useful for monitoring databases, mail servers, or custom applications.

Required Parameters:

  • check_type: "tcp"
  • url: Hostname or IP address (e.g., "example.com" or "192.168.1.1")
  • port: Port number (1-65535)
  • minutes_interval: Check interval in minutes

Optional Parameters:

  • name: Monitor name
  • request_timeout: Timeout in seconds (1-60, default: 30)
  • integration_uuids: Array of integration UUIDs

Example:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "network_monitor": {
      "name": "Database Server",
      "url": "db.example.com",
      "check_type": "tcp",
      "port": 5432,
      "minutes_interval": 5,
      "request_timeout": 10
    }
  }'

PING Monitor

Uses ICMP ping to verify if a server is online and responding. Measures basic connectivity and latency.

Required Parameters:

  • check_type: "ping"
  • url: Hostname or IP address (e.g., "example.com" or "8.8.8.8")
  • minutes_interval: Check interval in minutes

Optional Parameters:

  • name: Monitor name
  • request_timeout: Timeout in seconds (1-60, default: 30)
  • integration_uuids: Array of integration UUIDs

Example:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "network_monitor": {
      "name": "Server Ping",
      "url": "192.168.1.1",
      "check_type": "ping",
      "minutes_interval": 5
    }
  }'

Keyword Monitor

Verifies webpage content by checking for specific keywords or phrases. An incident is created if the monitored keywords are missing from the webpage response.

Required Parameters:

  • check_type: "keyword"
  • url: Target URL (e.g., "https://example.com")
  • keywords: Comma-separated list of keywords or array of keywords (e.g., "keyword1,keyword2" or ["keyword1", "keyword2"])
  • minutes_interval: Check interval in minutes

Optional Parameters:

  • name: Monitor name
  • http_method: HTTP method ("method_get", "method_post", etc., default: "method_get")
  • request_timeout: Timeout in seconds (1-60, default: 30)
  • check_ssl_errors: Check SSL errors (default: true)
  • follow_redirections: Follow HTTP redirects (default: true)
  • auth_type: Authentication type ("none", "basic", "bearer", default: "none")
  • auth_username: Username for basic/bearer auth
  • auth_password: Password/token for basic/bearer auth
  • integration_uuids: Array of integration UUIDs

Example:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "network_monitor": {
      "name": "Content Check",
      "url": "https://example.com",
      "check_type": "keyword",
      "keywords": "Welcome,Online",
      "http_method": "method_get",
      "minutes_interval": 10
    }
  }'

Heartbeat Monitor

A passive monitoring type where your system actively reports its status. Ideal for monitoring background jobs, cron tasks, or batch processes. No URL is required.

Required Parameters:

  • check_type: "heartbeat"
  • name: Monitor name (required for heartbeat monitors)
  • minutes_interval: Expected heartbeat interval in minutes

Optional Parameters:

  • request_timeout: Timeout in seconds (1-60, default: 30)
  • integration_uuids: Array of integration UUIDs

Example:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "network_monitor": {
      "name": "Daily Backup Job",
      "check_type": "heartbeat",
      "minutes_interval": 1440
    }
  }'

Response

All monitor creation requests return the created monitor object:

json
{
  "id": 123,
  "uuid": "NMABC123",
  "name": "My Website",
  "url": "https://example.com",
  "check_type": "http",
  "status": "initializing",
  "paused": false,
  "minutes_interval": 5,
  "check_ssl_errors": true,
  "domain_expiry_reminders": true,
  "request_timeout": 30,
  "auth_type": "none",
  "http_method": "method_get",
  "request_body": null,
  "send_as_json": false,
  "follow_redirections": true,
  "port": null,
  "keywords": [],
  "integration_uuids": [],
  "up_http_status_codes": ["2xx", "3xx"],
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z"
}

Error Response

If validation fails, a 422 Unprocessable Entity response is returned:

json
{
  "errors": [
    "Url can't be blank",
    "Http method can't be blank"
  ]
}

Get Monitor

Retrieve details of a specific monitor.

http
GET /api/v1/network_monitors/:uuid
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X GET https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Response

json
{
  "id": 1,
  "uuid": "NM123",
  "name": "Website Uptime",
  "url": "https://example.com",
  "check_type": "http",
  "status": "success",
  "uptime": 99.95,
  "response_time": 125.5,
  "last_check": "2024-01-02T12:30:00Z",
  "open_incident_uuids": ["INC123", "INC456"],
  "created_at": "2024-01-01T00:00:00Z"
}

Update Monitor

Update an existing monitor.

http
PUT /api/v1/network_monitors/:uuid
Authorization: Bearer YOUR_PROJECT_API_TOKEN
Content-Type: application/json

Example with curl:

bash
curl -X PUT https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "minutes_interval": 10
  }'

Request Body

json
{
  "name": "Updated Monitor Name",
  "interval": 120,
  "regions": ["us-east", "eu-west", "ap-south"]
}

Response

json
{
  "data": {
    "id": "mon_123",
    "name": "Updated Monitor Name",
    "type": "http",
    "status": "active",
    "url": "https://example.com",
    "created_at": "2024-01-01T00:00:00Z"
  }
}

Delete Monitor

Delete a monitor.

http
DELETE /api/v1/network_monitors/:uuid
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X DELETE https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Pause Monitor

Pause a monitor so it stops running checks.

http
POST /api/v1/network_monitors/:uuid/pause
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID/pause \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Response

Returns the monitor with paused: true.

json
{
  "id": 1,
  "uuid": "NM123",
  "paused": true
}

Resume Monitor

Resume a paused monitor so it starts running checks again.

http
POST /api/v1/network_monitors/:uuid/resume
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X POST https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID/resume \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Response

Returns the monitor with paused: false.

json
{
  "id": 1,
  "uuid": "NM123",
  "paused": false
}

Get Latest Transactions

Retrieve a paginated list of the latest transactions for a monitor.

http
GET /api/v1/network_monitors/:uuid/transactions
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X GET "https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID/transactions?page=1&per_page=50" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Query Parameters

ParameterTypeDescriptionDefault
pageintegerPage number1
per_pageintegerItems per page (max: 100)50
statusstringFilter by status (success, failure)all
transaction_typestringFilter by type (http, tcp, ping, keyword, heartbeat)all

Note:

  • Transactions are ordered by creation date in descending order (most recent first).
  • By default, only transactions from the last 1 hour are returned.
  • SSL and domain transactions are excluded from results and counts.

Response

json
{
  "data": [
    {
      "id": 123,
      "transaction_type": "http",
      "status": "success",
      "status_code": 200,
      "status_message": "OK",
      "response_time": 123.45,
      "queue_name": "us-east-1",
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 50,
    "total_pages": 2,
    "total_count": 45
  }
}

Response Fields

FieldTypeDescription
dataarrayArray of transaction objects
data[].idintegerTransaction ID
data[].transaction_typestringType of transaction (http, tcp, ping, keyword, heartbeat). Note: SSL and domain transactions are excluded.
data[].statusstringTransaction status (success, failure)
data[].status_codeinteger|nullHTTP status code (if applicable)
data[].status_messagestring|nullStatus message
data[].response_timefloat|nullResponse time in milliseconds
data[].queue_namestring|nullQueue/location name where the check was performed
data[].created_atstringISO 8601 timestamp of creation
data[].updated_atstringISO 8601 timestamp of last update
metaobjectPagination metadata
meta.current_pageintegerCurrent page number
meta.per_pageintegerNumber of items per page
meta.total_pagesintegerTotal number of pages
meta.total_countintegerTotal number of items

Get Monitor Data

Retrieve transaction data for a monitor with time range filtering.

http
GET /api/v1/network_monitors/:uuid/data
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X GET "https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID/data?start_date=2024-01-01T00:00:00Z&end_date=2024-01-02T00:00:00Z&period_length=5" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Query Parameters

ParameterTypeDescriptionDefault
start_datestringISO 8601 date/time for start of range (e.g., 2024-01-01T00:00:00Z)24 hours ago
end_datestringISO 8601 date/time for end of range (e.g., 2024-01-02T00:00:00Z)now
period_lengthintegerPeriod length in minutes (5, 15, 60, 360, 1440)5

Note: start_date must be before end_date. Dates should be in ISO 8601 format (e.g., 2024-01-01T00:00:00Z or 2024-01-01T00:00:00+00:00).

Response

json
{
  "monitor_uuid": "MONITOR_UUID",
  "start_time": "2024-01-01T00:00:00Z",
  "end_time": "2024-01-02T00:00:00Z",
  "period_length_minutes": 5,
  "data": [
    {
      "period_start": "2024-01-01T00:00:00Z",
      "total_transactions": 12,
      "successful_transactions": 12,
      "success_rate": 100.0,
      "response_time_avg": 125.5,
      "transaction_type": 1
    },
    {
      "period_start": "2024-01-01T00:05:00Z",
      "total_transactions": 12,
      "successful_transactions": 11,
      "success_rate": 91.67,
      "response_time_avg": 130.2,
      "transaction_type": 1
    }
  ]
}

Response Fields

FieldTypeDescription
monitor_uuidstringUUID of the monitor
start_timestringISO 8601 timestamp of the start of the data range
end_timestringISO 8601 timestamp of the end of the data range
period_length_minutesintegerLength of each period in minutes
dataarrayArray of transaction data points
data[].period_startstringISO 8601 timestamp of the period start
data[].total_transactionsintegerTotal number of transactions in the period
data[].successful_transactionsintegerNumber of successful transactions
data[].success_ratefloatSuccess rate percentage (0-100)
data[].response_time_avgfloatAverage response time in milliseconds
data[].transaction_typeintegerType of transaction

Example Use Cases

Get last 24 hours with 5-minute intervals:

bash
# Using ISO 8601 dates
curl "https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID/data?start_date=2024-01-01T00:00:00Z&end_date=2024-01-02T00:00:00Z&period_length=5"

Get last 7 days with 1-hour intervals:

bash
curl "https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID/data?start_date=2024-01-01T00:00:00Z&end_date=2024-01-08T00:00:00Z&period_length=60"

Get last 30 days with 1-day intervals:

bash
curl "https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID/data?start_date=2024-01-01T00:00:00Z&end_date=2024-01-31T00:00:00Z&period_length=1440"

Get data for a specific date range:

bash
curl "https://app.uptinio.com/api/v1/network_monitors/MONITOR_UUID/data?start_date=2024-01-15T08:00:00Z&end_date=2024-01-15T18:00:00Z&period_length=15"

Response

json
{
  "data": {
    "id": "mon_123",
    "deleted": true
  }
}

Error Codes

CodeDescription
monitor_not_foundThe specified monitor does not exist
invalid_requestThe request parameters are invalid
rate_limitToo many requests

Next Steps