API Documentation

This is the documentation for the available API endpoints, which are built around the REST architecture. All the API endpoints will return a JSON response with the standard HTTP response codes and need a Bearer Authentication via an API Key.

Authentication

All the API endpoints require an API key sent by the Bearer Authentication method.

curl --request GET \
--url 'https://uptimestudio.in/api/{endpoint}' \
--header 'Authorization: Bearer {api_key}' \

User

GET https://uptimestudio.in/api/user
curl --request GET \
--url 'https://uptimestudio.in/api/user' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id":"1",
        "type":"users",
        "email":"example@example.com",
        "billing":{
            "type":"personal",
            "name":"John Doe",
            "address":"Lorem Ipsum",
            "city":"Dolor Sit",
            "county":"Amet",
            "zip":"5000",
            "country":"",
            "phone":"",
            "tax_id":""
        },
        "is_enabled":true,
        "plan_id":"custom",
        "plan_expiration_date":"2025-12-12 00:00:00",
        "plan_settings":{
            ...
        },
        "plan_trial_done":false,
        "language":"english",
        "timezone":"UTC",
        "country":null,
        "date":"2020-01-01 00:00:00",
        "last_activity":"2020-01-01 00:00:00",
        "total_logins":10
    }
}

Monitors

GET https://uptimestudio.in/api/monitors/
curl --request GET \
--url 'https://uptimestudio.in/api/monitors/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "project_id": 0,
            "name": "Example",
            "type": "website",
            "target": "https://example.com/",
            "port": 0,
            "settings": {
                "check_interval_seconds": 3600,
                "timeout_seconds": 1,
                "request_method": "GET",
                "request_body": "",
                "request_basic_auth_username": "",
                "request_basic_auth_password": "",
                "request_headers": [],
                "response_status_code": 200,
                "response_body": "",
                "response_headers": []
            },
            "ping_servers_ids": [1],
            "is_ok": 1,
            "uptime": 95.5,
            "downtime": 4.5,
            "average_response_time": 500,
            "total_checks": 500,
            "total_ok_checks": 450,
            "total_not_ok_checks": 50,
            "last_check_datetime": "2021-03-25 08:27:07",
            "notifications": {
                "email_is_enabled": 0,
                "webhook":"",
                "slack":"",
                "twilio":""
            },
            "is_enabled": false,
            "datetime": "2021-02-12 21:54:29"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/monitors?&page=1",
        "last": "https://uptimestudio.in/api/monitors?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/monitors?&page=1"
    }
}
GET https://uptimestudio.in/api/monitors/{monitor_id}
curl --request GET \
--url 'https://uptimestudio.in/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "project_id": 0,
        "name": "Example",
        "type": "website",
        "target": "https://example.com/",
        "port": 0,
        "settings": {
            "check_interval_seconds": 3600,
            "timeout_seconds": 1,
            "request_method": "GET",
            "request_body": "",
            "request_basic_auth_username": "",
            "request_basic_auth_password": "",
            "request_headers": [],
            "response_status_code": 200,
            "response_body": "",
            "response_headers": []
        },
        "ping_servers_ids": [1],
        "is_ok": 1,
        "uptime": 95.5,
        "downtime": 4.5,
        "average_response_time": 500,
        "total_checks": 500,
        "total_ok_checks": 450,
        "total_not_ok_checks": 50,
        "last_check_datetime": "2021-03-25 08:27:07",
        "notifications": {
            "email_is_enabled": 0,
            "webhook":"",
            "slack":"",
            "twilio":""
        },
        "is_enabled": false,
        "datetime": "2021-02-12 21:54:29"
    }
}

Heartbeats

GET https://uptimestudio.in/api/heartbeats/
curl --request GET \
--url 'https://uptimestudio.in/api/heartbeats/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "project_id": 0,
            "name": "Demo cron",
            "code": "12345678901112131415",
            "settings": {
            "run_interval": 1,
            "run_interval_type": "minutes",
            "run_interval_grace": 1,
            "run_interval_grace_type": "seconds"
            },
            "is_ok": 1,
            "uptime": 75.5,
            "downtime": 24.5,
            "total_runs": 50,
            "total_missed_runs": 15,
            "last_run_datetime": "2021-03-30 19:17:22",
            "notifications": {
                "email_is_enabled": 0,
                "webhook": "",
                "slack": "",
                "twilio": ""
            },
            "is_enabled": true,
            "datetime": "2021-03-09 11:30:20"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/heartbeats?&page=1",
        "last": "https://uptimestudio.in/api/heartbeats?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/heartbeats?&page=1"
    }
}
GET https://uptimestudio.in/api/heartbeats/{heartbeat_id}
curl --request GET \
--url 'https://uptimestudio.in/api/heartbeats/{heartbeat_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "project_id": 0,
        "name": "Demo cron",
        "code": "12345678901112131415",
        "settings": {
        "run_interval": 1,
        "run_interval_type": "minutes",
        "run_interval_grace": 1,
        "run_interval_grace_type": "seconds"
        },
        "is_ok": 1,
        "uptime": 75.5,
        "downtime": 24.5,
        "total_runs": 50,
        "total_missed_runs": 15,
        "last_run_datetime": "2021-03-30 19:17:22",
        "notifications": {
            "email_is_enabled": 0,
            "webhook": "",
            "slack": "",
            "twilio": ""
        },
        "is_enabled": true,
        "datetime": "2021-03-09 11:30:20"
    }
}

Domain names

GET https://uptimestudio.in/api/domain-names/
curl --request GET \
--url 'https://uptimestudio.in/api/domain-names/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "project_id": 0,
            "name": "AltumCode.Com",
            "target": "altumcode.com",
            "whois": {
                "start_datetime": "2019-12-15 18:03:36",
                "updated_datetime": "2020-05-24 15:37:15",
                "end_datetime": "2022-12-15 18:03:36",
                "registrar": "NAMECHEAP INC",
                "nameservers": [
                    "ns1.digitalocean.com",
                    "ns2.digitalocean.com",
                    "ns3.digitalocean.com"
                ]
            },
            "whois_notifications": null,
            "ssl": {
                "issuer_name": "Let's Encrypt",
                "issuer_full": "R3",
                "start_datetime": "2021-06-05 14:40:13",
                "end_datetime": "2021-09-03 14:40:13"
            },
            "ssl_notifications": null,
            "total_checks": 25,
            "last_check_datetime": "2021-07-01 14:42:14",
            "next_check_datetime": "2021-07-04 14:42:15",
            "is_enabled": true,
            "last_datetime": null,
            "datetime": "2021-03-09 11:30:20"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/domain-names?&page=1",
        "last": "https://uptimestudio.in/api/domain-names?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/domain-names?&page=1"
    }
}
GET https://uptimestudio.in/api/domain-names/{domain_name_id}
curl --request GET \
--url 'https://uptimestudio.in/api/domain-names/{domain_name_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "project_id": 0,
        "name": "AltumCode.Com",
        "target": "altumcode.com",
        "whois": {
            "start_datetime": "2019-12-15 18:03:36",
            "updated_datetime": "2020-05-24 15:37:15",
            "end_datetime": "2022-12-15 18:03:36",
            "registrar": "NAMECHEAP INC",
            "nameservers": [
                "ns1.digitalocean.com",
                "ns2.digitalocean.com",
                "ns3.digitalocean.com"
            ]
        },
        "whois_notifications": null,
        "ssl": {
            "issuer_name": "Let's Encrypt",
            "issuer_full": "R3",
            "start_datetime": "2021-06-05 14:40:13",
            "end_datetime": "2021-09-03 14:40:13"
        },
        "ssl_notifications": null,
        "total_checks": 25,
        "last_check_datetime": "2021-07-01 14:42:14",
        "next_check_datetime": "2021-07-04 14:42:15",
        "is_enabled": true,
        "last_datetime": null,
        "datetime": "2021-03-09 11:30:20"
    }
}

Status pages

GET https://uptimestudio.in/api/status-pages/
curl --request GET \
--url 'https://uptimestudio.in/api/status-pages/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "domain_id": 0,
            "monitors_ids": [1,2,3],
            "project_id": 0,
            "url": "example",
            "full_url": "https://uptimestudio.in/s/example/",
            "name": "Example",
            "description": "This is just a simple description for the example status page 👋.",
            "socials": {
              "facebook": "example",
              "instagram": "example",
              "twitter": "example",
              "email": "",
              "website": "https://example.com/"
            },
            "logo_url": "",
            "favicon_url": ""
            "password": false,
            "timezone": "UTC",
            "custom_js": "",
            "custom_css": "",
            "pageviews": 50,
            "is_se_visible": true,
            "is_removed_branding": false,
            "is_enabled": true,
            "datetime": "2021-02-16 10:47:34"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/status-pages?&page=1",
        "last": "https://uptimestudio.in/api/status-pages?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/status-pages?&page=1"
    }
}
GET https://uptimestudio.in/api/status-pages/{status_page_id}
curl --request GET \
--url 'https://uptimestudio.in/api/status-pages/{status_page_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "domain_id": 0,
        "monitors_ids": [1,2,3],
        "project_id": 0,
        "url": "example",
        "full_url": "https://uptimestudio.in/s/example/",
        "name": "Example",
        "description": "This is just a simple description for the example status page 👋.",
        "socials": {
          "facebook": "example",
          "instagram": "example",
          "twitter": "example",
          "email": "",
          "website": "https://example.com/"
        },
        "logo_url": "",
        "favicon_url": ""
        "password": false,
        "timezone": "UTC",
        "custom_js": "",
        "custom_css": "",
        "pageviews": 50,
        "is_se_visible": true,
        "is_removed_branding": false,
        "is_enabled": true,
        "datetime": "2021-02-16 10:47:34"
    }
}

Status page statistics

GET https://uptimestudio.in/api/statistics/{status_page_id}
curl --request GET \
--url 'https://uptimestudio.in/api/statistics/{status_page_id}?start_date=2020-01-01&end_date=2021-01-01' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
start_date Required Start date in Y-m-d format.
end_date Required End date in Y-m-d format.
type Optional Type of data to be returned. Allowed values are: overview, referrer_host, referrer_path, country_code, city_name, os_name, browser_name, device_type, browser_language, utm_source, utm_medium, utm_campaign. Defaults to overview.
country_code Optional Parameter only available for the city_name type.
utm_source Optional Parameter only available for the utm_medium and utm_campaign type.
utm_medium Optional Parameter only available for the utm_campaign type.
{
    "data": [
        {
            "pageviews": 20,
            "visitors": 5,
            "formatted_date": "2021-01"
        },
        {
            "pageviews": 35,
            "visitors": 10,
            "formatted_date": "2021-02"
        },
        {
            "pageviews": 50,
            "visitors": 25,
            "formatted_date": "2021-03"
        }
    ]
}

Projects

GET https://uptimestudio.in/api/projects/
curl --request GET \
--url 'https://uptimestudio.in/api/projects/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "name": "Development",
            "color": "#0e23cc",
            "last_datetime": "2021-03-14 21:22:37",
            "datetime": "2021-02-04 17:51:07"
        },
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/projects?&page=1",
        "last": "https://uptimestudio.in/api/projects?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/projects?&page=1"
    }
}
GET https://uptimestudio.in/api/projects/{project_id}
curl --request GET \
--url 'https://uptimestudio.in/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "name": "Development",
        "color": "#0e23cc",
        "last_datetime": "2021-03-14 21:22:37",
        "datetime": "2021-02-04 17:51:07"
    }
}
POST https://uptimestudio.in/api/projects
Parameters Details Description
name Required -
color Optional -
curl --request POST \
--url 'https://uptimestudio.in/api/projects' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#ffffff' \
{
    "data": {
        "id": 1
    }
}
POST https://uptimestudio.in/api/projects/{project_id}
Parameters Details Description
name Optional -
color Optional -
curl --request POST \
--url 'https://uptimestudio.in/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#000000' \
{
  "data": {
    "id": 1
  }
}
DELETE https://uptimestudio.in/api/projects/{project_id}
curl --request DELETE \
--url 'https://uptimestudio.in/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \

Custom domains

GET https://uptimestudio.in/api/domains/
curl --request GET \
--url 'https://uptimestudio.in/api/domains/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "scheme": "https://",
            "host": "example.com",
            "custom_index_url": "",
            "is_enabled": true,
            "last_datetime": null,
            "datetime": "2021-02-04 23:29:18"
        },
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/domains?&page=1",
        "last": "https://uptimestudio.in/api/domains?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/domains?&page=1"
    }
}
GET https://uptimestudio.in/api/domains/{domain_id}
curl --request GET \
--url 'https://uptimestudio.in/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "scheme": "https://",
        "host": "example.com",
        "custom_index_url": "",
        "is_enabled": true,
        "last_datetime": null,
        "datetime": "2021-02-04 23:29:18"
    }
}
POST https://uptimestudio.in/api/domains
Parameters Details Description
host Required -
custom_index_url Optional -
custom_not_found_url Optional -
curl --request POST \
--url 'https://uptimestudio.in/api/domains' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=domain.com' \
--form 'custom_index_url=https://mywebsite.com/' \
--form 'custom_not_found_url=https://mywebsite.com/404-page'
{
    "data": {
        "id": 1
    }
}
POST https://uptimestudio.in/api/domains/{domain_id}
Parameters Details Description
host Optional -
custom_index_url Optional -
custom_not_found_url Optional -
curl --request POST \
--url 'https://uptimestudio.in/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=domain.com' \
{
  "data": {
    "id": 1
  }
}
DELETE https://uptimestudio.in/api/domains/{domain_id}
curl --request DELETE \
--url 'https://uptimestudio.in/api/domains/{domain_id}' \
--header 'Authorization: Bearer {api_key}' \

Notification handlers

GET https://uptimestudio.in/api/notification-handler/
curl --request GET \
--url 'https://uptimestudio.in/api/notification-handler/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "type": "email",
            "name": "Work email",
            "settings": {
                "email": "hey@example.com"
            },
            "is_enabled": true,
            "last_datetime": null,
            "datetime": "2021-06-27 22:16:23"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/notification-handler?&page=1",
        "last": "https://uptimestudio.in/api/notification-handler?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/notification-handler?&page=1"
    }
}
GET https://uptimestudio.in/api/notification-handler/{notification_handler_id}
curl --request GET \
--url 'https://uptimestudio.in/api/notification-handler/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "type": "email",
        "name": "Work email",
        "settings": {
            "email": "hey@example.com"
        },
        "is_enabled": true,
        "last_datetime": null,
        "datetime": "2021-06-27 22:16:23"
    }
}

Payments

GET https://uptimestudio.in/api/payments/
curl --request GET \
--url 'https://uptimestudio.in/api/payments/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "plan_id": 1,
            "processor": "stripe",
            "type": "one_time",
            "frequency": "monthly",
            "email": "example@example.com",
            "name": null,
            "total_amount": "4.99",
            "currency": "USD",
            "status": true,
            "date": "2021-03-25 15:08:58"
        },
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/payments?&page=1",
        "last": "https://uptimestudio.in/api/payments?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/payments?&page=1"
    }
}
GET https://uptimestudio.in/api/payments/{payment_id}
curl --request GET \
--url 'https://uptimestudio.in/api/payments/{payment_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "plan_id": 1,
        "processor": "stripe",
        "type": "one_time",
        "frequency": "monthly",
        "email": "example@example.com",
        "name": null,
        "total_amount": "4.99",
        "currency": "USD",
        "status": true,
        "date": "2021-03-25 15:08:58"
    }
}

Logs

GET https://uptimestudio.in/api/logs/
curl --request GET \
--url 'https://uptimestudio.in/api/logs/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional The page number that you want results from. Defaults to 1.
results_per_page Optional How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250. Defaults to 25.
{
    "data": [
        {
            "type": "login.success",
            "ip": "127.0.0.1",
            "date": "2021-02-03 12:21:40"
        },
        {
            "type": "login.success",
            "ip": "127.0.0.1",
            "date": "2021-02-03 12:23:26"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://uptimestudio.in/api/payments?&page=1",
        "last": "https://uptimestudio.in/api/payments?&page=1",
        "next": null,
        "prev": null,
        "self": "https://uptimestudio.in/api/payments?&page=1"
    }
}