Back to top

SiteUptime API 2.0.1

Full SiteUptime RESTfull API v2.0.1 documntation can be downloaded here

SiteUptime Monitors

List all monitors
GET/api/2.0/monitors

Example URI

GET /api/2.0/monitors
Request
HideShow
Headers
X-Auth-API-Key: YOUR-API-KEY
Response  200
HideShow
Headers
Content-Type: application/json
X-Frame-Options: SAMEORIGIN
Body
{
  "num_results": 2,
  "monitors": [
    {
      "id": "16214",
      "active": "yes",
      "name": "Your Monitor Name",
      "host": "https://yourdomain.com",
      "service": "https",
      "port": "0",
      "period": "2",
      "location": "sf",
      "timeout": "25",
      "downsubject": "",
      "upsubject": "",
      "altemailalerts": "",
      "sendalertafter": "1",
      "dontsendupalert": "no",
      "sendurlalert": "no",
      "sendjabberalert": "no",
      "sendalldownalerts": "no",
      "sendsms": 0,
      "phonenumbers": "",
      "callalert": 0,
      "phonenumberscallalert": "",
      "enablepublicstatistics": "no",
      "addtostatuspage": "no",
      "numchecks": 776483,
      "numoutages": 160,
      "numfailures": 48181,
      "uptime": "93.795%",
      "current_status": "Ok"
    },
    {
      "id": "27282",
      "active": "yes",
      "name": "Your Monitor Name",
      "host": "yourdomain.com",
      "service": "http",
      "port": "0",
      "period": "2",
      "location": "ny",
      "timeout": "25",
      "downsubject": "",
      "upsubject": "",
      "altemailalerts": "",
      "sendalertafter": "1",
      "dontsendupalert": "no",
      "sendurlalert": "yes",
      "sendjabberalert": "no",
      "sendalldownalerts": "no",
      "sendsms": 0,
      "phonenumbers": "",
      "callalert": 0,
      "phonenumberscallalert": "",
      "enablepublicstatistics": "no",
      "addtostatuspage": "no",
      "numchecks": 1,
      "numoutages": 0,
      "numfailures": 0,
      "uptime": "100.000%",
      "current_status": "Ok"
    }
  ]
}

FailuresGET/api/2.0/monitors/{{monitor_id}}

Example URI

GET /api/2.0/monitors/1234
Request
HideShow
Headers
X-Auth-API-Key: YOUR-API-KEY
Response  200
HideShow
Headers
Content-Type: application/json
X-Frame-Options: SAMEORIGIN
Body
{
  "id": "27282",
  "active": "yes",
  "name": "Your Monitor Name",
  "host": "yourdomain.com",
  "service": "http",
  "port": "0",
  "period": "2",
  "location": "ny",
  "timeout": "25",
  "downsubject": "",
  "upsubject": "",
  "altemailalerts": "",
  "sendalertafter": "1",
  "dontsendupalert": "no",
  "sendurlalert": "yes",
  "sendjabberalert": "no",
  "sendalldownalerts": "no",
  "sendsms": 0,
  "phonenumbers": "",
  "callalert": 0,
  "phonenumberscallalert": "",
  "enablepublicstatistics": "no",
  "addtostatuspage": "no",
  "numchecks": 1,
  "numoutages": 0,
  "numfailures": 0,
  "uptime": "100.000%",
  "current_status": "Ok"
}

Retrieve a single monitorGET/api/2.0/monitors/{{monitor_id}}/failures/{{YYYY-MM-DD}}

Example URI

GET /api/2.0/monitors/1234/failures/ (last 50 failures)
GET /api/2.0/monitors/1234/failures/2016-11-01 (failures by date)
Request
HideShow
Headers
X-Auth-API-Key: YOUR-API-KEY
Response  200
HideShow
Headers
Content-Type: application/json
X-Frame-Options: SAMEORIGIN
Body

[
    {
      "ErrorMessage": "Connection timed out",
      "RespTime": "27.088",
      "UserServiceId": "1234",
      "FailureDate": "2016-08-23 19:15:45"
    },
    {
      "ErrorMessage": "Connection timed out",
      "RespTime": "25.042",
      "UserServiceId": "1234",
      "FailureDate": "2016-08-23 19:13:42"
    }
]

Create new monitorPOST/api/2.0/monitors/

Example URI

POST /api/2.0/monitors/
Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-Auth-API-Key: YOUR-API-KEY
Body
Name=Test+API+Monitor&Service=http&Location=ny&HostName=http%3A%2F%2Fyourdomain.com&CheckPeriod=15&SendUrlAlert=1&CustomUrlAlert=http%3A%2F%2Frequestb.in%2F12cre581
Response  200
HideShow
Headers
Content-Type: application/json
X-Frame-Options: SAMEORIGIN
Body
{
  "Id": "27282",
  "UserId": "139193",
  "Name": "Your Monitor Name",
  "ServiceId": "1",
  "HostName": "yourdomain.com",
  "Page": "",
  "CheckPeriod": "15",
  "Timeout": "25",
  "Track403": "n",
  "Track503": "n",
  "InsertDate": "2016-08-24 12:59:46",
  "LastCheckDate": "0000-00-00 00:00:00",
  "LastResult": null,
  "Uptime": null,
  "Downtime": null,
  "AverageResponseTime": null,
  "SendAlert": "y",
  "SendAltAlert": "n",
  "SupportEmail": "",
  "PhoneNumbers": "",
  "PhoneNumbersCallAlert": "",
  "Enabled": "y",
  "OutageTime": null,
  "SendSms": "n",
  "CallAlert": "n",
  "PortNumber": "0",
  "DownSubject": "",
  "OkSubject": "",
  "Domain": "",
  "Content": "",
  "InverseSearch": "n",
  "StrictSSL": "n",
  "Login": "",
  "Password": "",
  "SendAlertAfter": "1",
  "DontSendUpAlert": "n",
  "DontSendSMSUpAlert": "n",
  "SendUrlAlert": "y",
  "CustomUrlAlert": "",
  "SendJabberAlert": "n",
  "SendPagerdutyAlert": "n",
  "PagerdutyApiKey": "",
  "SendAllDownAlerts": "n",
  "UseStaticIP": "n",
  "UsLocationsOnly": "n",
  "HideSummaryStat": "y",
  "HideStatusStat": "y",
  "ListOrder": "0",
  "Scheduler": "",
  "PstTime": "3.0",
  "DaylightSaving": "y",
  "CloudFlareDomainID": "0",
  "SSLVersion": "",
  "MappId": "0",
  "Traceroute": "n",
  "UptimePeriod": "",
  "GroupName": null
}

Update monitorPUT/api/2.0/monitors/{{monitor_id}}

Example URI

PUT /api/2.0/monitors/1234
Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-Auth-API-Key: YOUR-API-KEY
Body
Name=Test+API+Monitor&Service=http&Location=ny&HostName=http%3A%2F%2Fyourdomain.com&CheckPeriod=15&SendUrlAlert=1&CustomUrlAlert=http%3A%2F%2Frequestb.in%2F12cre581
Response  200
HideShow
Headers
Content-Type: application/json
X-Frame-Options: SAMEORIGIN
Body
{
  "Id": "27282",
  "UserId": "139193",
  "Name": "Your Monitor Name",
  "ServiceId": "1",
  "HostName": "yourdomain.com",
  "Page": "",
  "CheckPeriod": "15",
  "Timeout": "25",
  "Track403": "n",
  "Track503": "n",
  "InsertDate": "2016-08-24 12:59:46",
  "LastCheckDate": "0000-00-00 00:00:00",
  "LastResult": null,
  "Uptime": null,
  "Downtime": null,
  "AverageResponseTime": null,
  "SendAlert": "y",
  "SendAltAlert": "n",
  "SupportEmail": "",
  "PhoneNumbers": "",
  "PhoneNumbersCallAlert": "",
  "Enabled": "y",
  "OutageTime": null,
  "SendSms": "n",
  "CallAlert": "n",
  "PortNumber": "0",
  "DownSubject": "",
  "OkSubject": "",
  "Domain": "",
  "Content": "",
  "InverseSearch": "n",
  "StrictSSL": "n",
  "Login": "",
  "Password": "",
  "SendAlertAfter": "1",
  "DontSendUpAlert": "n",
  "DontSendSMSUpAlert": "n",
  "SendUrlAlert": "y",
  "CustomUrlAlert": "",
  "SendJabberAlert": "n",
  "SendPagerdutyAlert": "n",
  "PagerdutyApiKey": "",
  "SendAllDownAlerts": "n",
  "UseStaticIP": "n",
  "UsLocationsOnly": "n",
  "HideSummaryStat": "y",
  "HideStatusStat": "y",
  "ListOrder": "0",
  "Scheduler": "",
  "PstTime": "3.0",
  "DaylightSaving": "y",
  "CloudFlareDomainID": "0",
  "SSLVersion": "",
  "MappId": "0",
  "Traceroute": "n",
  "UptimePeriod": "",
  "GroupName": null
}

Delete monitorDELETE/api/2.0/monitors/

Example URI

DELETE /api/2.0/monitors/
Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-Auth-API-Key: YOUR-API-KEY