- email: string
- password: string
- confirm_password: string
- name: string
- time_zone: string, in format as "Pacific Time (US & Canada)", available values could be taken in Profile dropdown
Developers API
Overview
UptimeGuard API is build with REST principles. It uses JSON format for request and response bodies.Authentication
Get your API token in User Profile (or using "/login" API function, to authorize via email/password and get user profile details with API token).Each request should contain "Authorization" and "Content-Type" headers
Authorization: Bearer [API token here]
Content-Type: application/json
Request format
All params should be transmitted as a properties of a JSON object, for example{
"email":"john@example.com",
"password":"password",
"confirm_password": "password",
"name": "John Doe",
"time_zone": "Pacific Time (US & Canada)",
"settings": {
"nested_param": "value 1",
"nested_param2": "value 2",
}
}
Response format and codes
General success response format is{
status: 0,
response: [... response object/array ...]
}
General error response format is
{
status: 1,
response: "Error description string"
}
status filed helps to detect response type from JSON contents.API also uses following HTTP response codes to make high-level indication of error condition
400: Wrong request params
401: Auth token is not correct or user not found
404: Accessed route not found or your user does not have an access
200: Success or handled error condition, that differs from 400/404 codes
500: Internal server error, that can't be handled from client side
User / Authorization
Register
Authorization: none
{
"status": 0,
"response": {
"id": 1,
"email": "john@example.com",
"name": "John Doe",
"time_zone": "Pacific Time (US & Canada)",
"api_token": "eyJ...LB_k",
"monitors_count": 0,
"monitors_limit": null
}
}
Login
Authorization: none
- email: string
- password: string
{
"status": 0,
"response": {
"id": 1,
"email": "john@example.com",
"name": "John Doe",
"time_zone": "Pacific Time (US & Canada)",
"api_token": "eyJ...LB_k",
"monitors_count": 0,
"monitors_limit": null
}
}
Get current user profile
Authorization: required
{
"status": 0,
"response": {
"id": 1,
"email": "john@example.com",
"name": "John Doe",
"time_zone": "Pacific Time (US & Canada)",
"api_token": "eyJ...LB_k",
"monitors_count": 0,
"monitors_limit": null
}
}
Update current user profile
Authorization: required
- email: string
- name: string
- time_zone: string
- password: string, OMIT THIS IF YOU DO NOT WANT TO CHANGE PASSWORD
- confirm_password: string, OMIT THIS IF YOU DO NOT WANT TO CHANGE PASSWORD
{
"status": 0,
"response": {
"id": 1,
"email": "john@example.com",
"name": "I like UptimeGuard",
"time_zone": "Pacific Time (US & Canada)",
"api_token": "eyJ...LB_k",
"monitors_count": 0,
"monitors_limit": null
}
}
Groups
Get groups list
Authorization: required
{
"status": 0,
"response": [
{
"id": 7,
"name": "Social Media"
},
{
"id": 8,
"name": "Work"
}
]
}
Get group
Authorization: required
{
"status": 0,
"response": {
"id": 7,
"name": "Social Media"
}
}
Create group
Authorization: required
- name: string #min_length: 4
{
"status": 0,
"response": {
"id": 12,
"name": "Valid"
}
}
Update group
Authorization: required
- name: string #min_length: 4
{
"status": 0,
"response": {
"id": 12,
"name": "Computer Universe"
}
}
Delete group
Authorization: required
{
"status": 0,
"response": null
}
Monitors
Get brief monitors list
Authorization: required
{
"status": 0,
"response": [
{
"id": 301,
"host": "http://stdout.in",
"port": 80,
"normalized_uri": "http://stdout.in:80/",
"friendly_name": "stdout.in",
"time_interval": 5,
"last_ping": "2016-08-22 16:48:00 UTC",
"next_ping": "2016-08-22 16:53:00 UTC",
"current_status": "up",
"current_status_created_at": "2016-07-13T09:09:55.203Z",
"favicon": "/uploads/favicons/301.ico",
"emails_for_notifications": [
"abc@example.com"
],
"slack_for_notifications": "",
"created_at": "2016-07-13T09:09:48.790Z",
"updated_at": "2016-08-22T16:48:18.509Z",
"has_status_page": false,
"type": "base"
},
{
"id": 331,
"host": "http://stackoverflow.com",
"port": 80,
"normalized_uri": "http://stackoverflow.com:80/",
"friendly_name": "stackoverflow.com",
"time_interval": 5,
"last_ping": "2016-08-22 16:48:00 UTC",
"next_ping": "2016-08-22 16:53:00 UTC",
"current_status": "up",
"current_status_created_at": "2016-08-22T16:48:19.996Z",
"favicon": "/uploads/favicons/331.ico",
"emails_for_notifications": [
"abc@example.com"
],
"slack_for_notifications": "",
"created_at": "2016-08-22T16:47:34.216Z",
"updated_at": "2016-08-22T16:48:20.042Z",
"has_status_page": true,
"type": "advanced"
}
]
}
Get base monitor
Authorization: required
{
"status": 0,
"response": {
"id": 111,
"host": "http://example.com",
"port": 80,
"normalized_uri": "http://example.com:80/",
"friendly_name": "Example web site",
"time_interval": 15,
"last_ping": "2016-08-19 15:33:00 UTC",
"next_ping": "2016-08-19 15:43:00 UTC",
"current_status": "up",
"current_status_created_at": "2016-08-19T15:43:44.816Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-22T17:13:25.530Z",
"updated_at": "2016-08-22T17:13:25.530Z",
"has_status_page": true,
"settings": null,
"links": [
{
"rel": "self",
"href": "http://uptimeguard.net/api/v1/monitors/base/111"
},
{
"rel": "public_status_page",
"href": "http://uptimeguard.net/status/d113422a09"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/d113422a09/embedded"
}
]
}
}
Create base monitor
Authorization: required
- host: string
- friendly_name: string
- time_interval: integer
- emails_for_notifications: string, example : "one@example.com another@example.com"
- slack_for_notifications: string
- status_page: boolean
{
"status": 0,
"response": {
"id": 111,
"host": "http://example.com",
"port": 80,
"normalized_uri": "http://example.com:80/",
"friendly_name": "Example web site",
"time_interval": 15,
"last_ping": "2016-08-19 15:33:00 UTC",
"next_ping": "2016-08-19 15:43:00 UTC",
"current_status": "up",
"current_status_created_at": "2016-08-19T15:43:44.816Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-22T17:13:25.530Z",
"updated_at": "2016-08-22T17:13:25.530Z",
"has_status_page": true,
"settings": null,
"links": [
{
"rel": "self",
"href": "http://uptimeguard.net/api/v1/monitors/base/111"
},
{
"rel": "public_status_page",
"href": "http://uptimeguard.net/status/d113422a09"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/d113422a09/embedded"
}
]
}
}
Update base monitor
Authorization: required
- host: string
- friendly_name: string
- time_interval: integer
- emails_for_notifications: string, example : "one@example.com another@example.com"
- slack_for_notifications: string
- status_page: boolean
{
"status": 0,
"response": {
"id": 111,
"host": "http://example.com",
"port": 80,
"normalized_uri": "http://example.com:80/",
"friendly_name": "Example web site",
"time_interval": 20,
"last_ping": "2016-08-23 14:56:00 UTC",
"next_ping": "2016-08-23 15:26:00 UTC",
"current_status": "up",
"current_status_created_at": "2016-08-23T14:56:47.341Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"one@example.com",
"another@example.com"
],
"slack_for_notifications": "",
"created_at": "2016-08-17T17:01:40.021Z",
"updated_at": "2016-08-23T15:02:44.328Z",
"has_status_page": false,
"settings": null,
"links": [
{
"rel": "self",
"href": "https://uptimeguard.net/api/v1/monitors/base/111"
},
{
"rel": "public_status_page",
"href": "https://uptimeguard.net/status/d113422a09"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/d113422a09/embedded"
}
]
}
}
Delete base monitor
Authorization: required
{
"status": 0,
"response": null
}
Pause base monitor
Authorization: required
{
"status": 0,
"response": {
"id": 111,
"host": "http://example.com",
"port": 80,
"normalized_uri": "http://example.com:80/",
"friendly_name": "Example web site",
"time_interval": 15,
"last_ping": "2016-08-19 15:33:00 UTC",
"next_ping": null,
"current_status": "paused",
"current_status_created_at": "2016-08-19T15:43:44.816Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-22T17:13:25.530Z",
"updated_at": "2016-08-22T17:13:25.530Z",
"has_status_page": true,
"settings": null,
"links": [
{
"rel": "self",
"href": "http://uptimeguard.net/api/v1/monitors/base/111"
},
{
"rel": "public_status_page",
"href": "http://uptimeguard.net/status/d113422a09"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/d113422a09/embedded"
}
]
}
}
Resume base monitor
Authorization: required
{
"status": 0,
"response": {
"id": 111,
"host": "http://example.com",
"port": 80,
"normalized_uri": "http://example.com:80/",
"friendly_name": "Example web site",
"time_interval": 15,
"last_ping": "2016-08-19 15:33:00 UTC",
"next_ping": "2016-08-19 15:44:00 UTC",
"current_status": "unknown",
"current_status_created_at": "2016-08-19T15:43:44.816Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-22T17:13:25.530Z",
"updated_at": "2016-08-22T17:13:25.530Z",
"has_status_page": true,
"settings": null,
"links": [
{
"rel": "self",
"href": "http://uptimeguard.net/api/v1/monitors/base/111"
},
{
"rel": "public_status_page",
"href": "http://uptimeguard.net/status/d113422a09"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/d113422a09/embedded"
}
]
}
}
Reset statistics in base monitor
Authorization: required
{
"status": 0,
"response": null
}
Get advanced monitor
Authorization: required
{
"status": 0,
"response": {
"id": 222,
"host": "http://example.com",
"port": 443,
"normalized_uri": "http://example.com:443/",
"friendly_name": "Example web site",
"time_interval": 15,
"last_ping": null,
"next_ping": "2016-08-23 13:51:00 UTC",
"current_status": "unknown",
"current_status_created_at": "2016-08-23T13:51:44.733Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-23T15:19:24.755Z",
"updated_at": "2016-08-23T15:19:24.755Z",
"has_status_page": true,
"settings": {
"request_type": "GET",
"support_redirects": true,
"success_response_codes": [
200,
404
],
"body_response": "String to find in body",
"response_condition": true,
"base_authentication_pass": "pass",
"base_authentication_login": "login"
},
"links": [
{
"rel": "self",
"href": "https://uptimeguard.net/api/v1/monitors/advanced/222"
},
{
"rel": "public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1/embedded"
}
]
}
}
Create advanced monitor
Authorization: required
- host: string
- friendly_name: string
- time_interval: integer
- port: integer
- settings:
- request_type: string
- support_redirects: boolean
- body_response: string
- response_condition: boolean
- success_response_codes: string, example: "200 404"
- base_authentication_login: string
- base_authentication_pass: string
- emails_for_notifications: string, example : "one@example.com another@example.com"
- slack_for_notifications: string
- status_page: boolean
{
"status": 0,
"response": {
"id": 222,
"host": "http://example.com",
"port": 443,
"normalized_uri": "http://example.com:443/",
"friendly_name": "Example web site",
"time_interval": 15,
"last_ping": null,
"next_ping": "2016-08-23 13:51:00 UTC",
"current_status": "unknown",
"current_status_created_at": "2016-08-23T13:51:44.733Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-23T15:19:24.755Z",
"updated_at": "2016-08-23T15:19:24.755Z",
"has_status_page": true,
"settings": {
"request_type": "GET",
"support_redirects": true,
"success_response_codes": [
200,
404
],
"body_response": "String to find in body",
"response_condition": true,
"base_authentication_pass": "pass",
"base_authentication_login": "login"
},
"links": [
{
"rel": "self",
"href": "https://uptimeguard.net/api/v1/monitors/advanced/222"
},
{
"rel": "public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1/embedded"
}
]
}
}
Update advanced monitor
Authorization: required
- host: string
- friendly_name: string
- time_interval: integer
- port: integer
- settings:
- request_type: string
- support_redirects: boolean
- body_response: string
- response_condition: boolean
- success_response_codes: string, example: "200 404"
- base_authentication_login: string
- base_authentication_pass: string
- emails_for_notifications: string, example : "one@example.com another@example.com"
- slack_for_notifications: string
- status_page: boolean
{
"status": 0,
"response": {
"id": 222,
"host": "http://example.com",
"port": 443,
"normalized_uri": "http://example.com:443/",
"friendly_name": "Example web site",
"time_interval": 40,
"last_ping": "2016-08-23 15:23:00 UTC",
"next_ping": "2016-08-23 15:38:00 UTC",
"current_status": "down",
"current_status_created_at": "2016-08-23T15:23:47.591Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-23T15:22:50.681Z",
"updated_at": "2016-08-23T15:24:12.725Z",
"has_status_page": true,
"settings": {
"request_type": "POST",
"support_redirects": false,
"success_response_codes": [
200
],
"body_response": "String to find in body",
"response_condition": true,
"base_authentication_pass": "pass",
"base_authentication_login": "login"
},
"links": [
{
"rel": "self",
"href": "https://uptimeguard.net/api/v1/monitors/advanced/222"
},
{
"rel": "public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1/embedded"
}
]
}
}
Delete advanced monitor
Authorization: required
{
"status": 0,
"response": null
}
Pause advanced monitor
Authorization: required
{
"status": 0,
"response": {
"id": 222,
"host": "http://example.com",
"port": 443,
"normalized_uri": "http://example.com:443/",
"friendly_name": "Example web site",
"time_interval": 15,
"last_ping": "2016-08-23 13:51:00 UTC",
"next_ping": null,
"current_status": "paused",
"current_status_created_at": "2016-08-23T13:51:44.733Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-23T15:19:24.755Z",
"updated_at": "2016-08-23T15:19:24.755Z",
"has_status_page": true,
"settings": {
"request_type": "GET",
"support_redirects": true,
"success_response_codes": [
200,
404
],
"body_response": "String to find in body",
"response_condition": true,
"base_authentication_pass": "pass",
"base_authentication_login": "login"
},
"links": [
{
"rel": "self",
"href": "https://uptimeguard.net/api/v1/monitors/advanced/222"
},
{
"rel": "public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1/embedded"
}
]
}
}
Resume advanced monitor
Authorization: required
{
"status": 0,
"response": {
"id": 222,
"host": "http://example.com",
"port": 443,
"normalized_uri": "http://example.com:443/",
"friendly_name": "Example web site",
"time_interval": 15,
"last_ping": "2016-08-23 13:21:00 UTC",
"next_ping": "2016-08-23 13:51:00 UTC",
"current_status": "unknown",
"current_status_created_at": "2016-08-23T13:51:44.733Z",
"favicon": "/images/default_ico.png",
"emails_for_notifications": [
"a@a.a",
"b@b.b"
],
"slack_for_notifications": null,
"created_at": "2016-08-23T15:19:24.755Z",
"updated_at": "2016-08-23T15:19:24.755Z",
"has_status_page": true,
"settings": {
"request_type": "GET",
"support_redirects": true,
"success_response_codes": [
200,
404
],
"body_response": "String to find in body",
"response_condition": true,
"base_authentication_pass": "pass",
"base_authentication_login": "login"
},
"links": [
{
"rel": "self",
"href": "https://uptimeguard.net/api/v1/monitors/advanced/222"
},
{
"rel": "public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1"
},
{
"rel": "embedded_public_status_page",
"href": "https://uptimeguard.net/status/33a112eda1/embedded"
}
]
}
}
Reset statistics in advanced monitor
Authorization: required
{
"status": 0,
"response": null
}
Alerts
Get alerts list
Authorization: required
{
"status": 0,
"response": [
{
"id": 1,
"alert_type": "response_time",
"target_value": "200",
"value_validation": null,
"uptime_monitor_id": 1,
"created_at\": "2018/12/05 14:24:32",
"updated_at": "2018/12/05 14:24:32"
},
{
"id": 2,
"alert_type": "response_time",
"target_value": "300",
"value_validation": null,
"uptime_monitor_id": 1,
"created_at\": "2018/12/05 14:25:32",
"updated_at": "2018/12/05 14:25:32"
}
]
}
Get alert
Authorization: required
{
"status": 0,
"response": {
"id": 1,
"alert_type": "response_time",
"target_value": "200",
"value_validation": null,
"uptime_monitor_id": 1,
"created_at\": "2018/12/05 14:24:32",
"updated_at": "2018/12/05 14:24:32"
}
}
Create alert
Authorization: required
- alert_type: string, example : "response_time"
- target_value: string, example : "200" #ms
- uptime_monitor_id: index, example : 1
{
"status": 0,
"response": {
"id": 1,
"alert_type": "response_time",
"target_value": "200",
"value_validation": null,
"uptime_monitor_id": 1,
"created_at\": "2018/12/05 14:24:32",
"updated_at": "2018/12/05 14:24:32"
}
}
Update alert
Authorization: required
- alert_type: string, example : "response_time"
- target_value: string, example : "500" #ms
{
"status": 0,
"response": {
"id": 1,
"alert_type": "response_time",
"target_value": "500",
"value_validation": null,
"uptime_monitor_id": 1,
"created_at\": "2018/12/05 14:24:32",
"updated_at": "2018/12/05 14:26:32"
}
}
Delete alert
Authorization: required
{
"status": 0,
"response": null
}
Transfers
Create transfer
Authorization: required
- monitorable_type: string
- monitorable_id: integer
- to_user_email: string
{
"status": 0,
"response": {
"id": 660,
"monitorable_type": "BaseUptimeMonitor",
"monitorable_id": 9,
"to_user_id": 1,
"from_user_id": 2,
"completed": false,
"token": "eEonneg9kWByCEbAiGf6uw",
"created_at": "2019-03-22T13:04:08.268Z",
"updated_at": "2019-03-22T13:04:08.268Z"
}
}
Get transfers list
Authorization: required
{
"status": 0,
"response": [
{
"id": 661,
"monitorable_type": "BaseUptimeMonitor",
"monitorable_id": 9,
"to_user_id": 1,
"from_user_id": 2,
"completed": false,
"token": "WpUQVdNbimOkxlFdCWz9Uw",
"created_at": "2019-03-22T13:04:37.357Z",
"updated_at": "2019-03-22T13:04:37.357Z"
},
{
"id": 660,
"monitorable_type": "BaseUptimeMonitor",
"monitorable_id": 9,
"to_user_id": 1,
"from_user_id": 2,
"completed": false,
"token": "eEonneg9kWByCEbAiGf6uw",
"created_at": "2019-03-22T13:04:08.268Z",
"updated_at": "2019-03-22T13:04:08.268Z"
},
{
"id": 659,
"monitorable_type": "BaseUptimeMonitor",
"monitorable_id": 9,
"to_user_id": 1,
"from_user_id": 2,
"completed": true,
"token": "Jntqb8jq9UIMVLp-0t0ZeA",
"created_at": "2019-03-22T11:57:54.769Z",
"updated_at": "2019-03-22T13:42:49.773Z"
}
]
}
Get transfer
Authorization: required
- token: string
{
"status": 0,
"response": {
"id": 659,
"monitorable_type": "BaseUptimeMonitor",
"monitorable_id": 9,
"to_user_id": 1,
"from_user_id": 2,
"completed": false,
"token": "Jntqb8jq9UIMVLp-0t0ZeA",
"created_at": "2019-03-22T11:57:54.769Z",
"updated_at": "2019-03-22T11:57:54.769Z"
}
}
Accept transfer
Authorization: none
- token: string
{
"status": 0,
"response": {
"id": 659,
"monitorable_type": "BaseUptimeMonitor",
"monitorable_id": 9,
"to_user_id": 1,
"from_user_id": 2,
"completed": true,
"token": "Jntqb8jq9UIMVLp-0t0ZeA",
"created_at": "2019-03-22T11:57:54.769Z",
"updated_at": "2019-03-22T11:57:54.769Z"
}
}
Reject transfer
Authorization: none
- token: string
{
"status": 0,
"response": null
}