Uptime.cam API v.1.0.0 Documentation

Integrate Uptimer.cam in all your websites and apps

We at Uptime.cam know how frustrating it is to have to login to a thousand Dashboards in order to track all your properties stats, so we developed an easy to use RESTful API, so that you can integrate our stats in your own applications.
Responses are provided as XML and JSON.
You can check the details of your uptime monitors, check logs, pagespeed historical data and create and edit uptimers.



New Website api_1_new_website GET

Description: Returning the Fields needed to create a new website for uptime monitoring

Address
https://www.uptime.cam/api/v1/websites/new.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
GET

Returns:

{
    "children": {
        "name":{},
        "timeout":{},
        "slackwebhook":{},
        "defaultnotification":{},
        "additionalemails":{},
        "twitter":{},
        "pushbullet":{},
        "loadtime":{}
    }
}
                                

Example:

<?php
    // Init cURL
    $curl = curl_init();
    // Set target URL
    curl_setopt($curl, CURLOPT_URL, "https://www.uptime.cam/api/v1/websites/new?apikey=1234");
    // Set the desired HTTP method (GET is default, see the documentation for each request)
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 
    // Execute the request and decode the json result into an associative array
    $response = json_decode(curl_exec($curl),true);
?>
                                



Get Website api_1_get_website GET

Description: Get monitored website data by ID

Address
https://www.uptime.cam/api/v1/websites/{id}.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
GET

Returns:

{
    "id":1,
    "name":"http:\/\/android-recovery.info",
    "timeout":15,"upsince":"2015-12-31T20:16:02+0200",
    "lateststatus":"Online",
    "latesthttp":"200",
    "latestloadtime":"2370",
    "latestcheck":"2016-02-28T11:33:02+0200",
    "slackwebhook":"https:\/\/hooks.slack.com\/services\/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",
    "additionalemails":"[email protected]",
    "defaultnotification":true,
    "certificatestate":false,
    "loadtime":false,
    "public":false,
    "whois":{
        "id":1,
        "name":"android-recovery.info",
        "idn_name":"android-recovery.info",
        "status":"clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited",
        "nameserver":"a:3:{i:0;s:15:\"c.dns.gandi.net\";i:1;s:15:\"b.dns.gandi.net\";i:2;s:15:\"a.dns.gandi.net\";}",
        "created":"2014-06-03T11:18:12+0300",
        "changed":"2016-02-04T22:45:05+0200",
        "expires":"2017-06-03T11:18:12+0300",
        "registered":true,
        "dnssec":false,
        "whoisserver":"whois.afilias.net",
        "registrar":"O:36:\"Novutec\\WhoisParser\\Result\\Registrar\":4:{s:5:\"\u0000*\u0000id\";N;s:7:\"\u0000*\u0000name\";s:9:\"Gandi SAS\";s:8:\"\u0000*\u0000email\";N;s:6:\"\u0000*\u0000url\";N;}",
        "rawdata":"a:1:{i:0;s:3131:\"Domain Name: ANDROID-RECOVERY.INFO\nDomain ID: D52911535-LRMS\nWHOIS Server:\nReferral URL: http:\/\/www.gandi.net\nUpdated Date: 2016-02-04T20:45:05Z\nCreation Date: 2014-06-03T08:18:12Z\nRegistry Expiry Date: 2017-06-03T08:18:12Z\nSponsoring Registrar: Gandi SAS\nSponsoring Registrar IANA ID: 81\nDomain Status: clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited\nRegistrant ID: MM13249-GANDI\nRegistrant Name: Michael Mazzolini\nRegistrant Organization:\nRegistrant Street: 32 avenue du gros-chene\nRegistrant City: Onex\nRegistrant State\/Province:\nRegistrant Postal Code: 1213\nRegistrant Country: CH\nRegistrant Phone: +41.227924510\nRegistrant Phone Ext:\nRegistrant Fax:\nRegistrant Fax Ext:\nRegistrant Email: [email protected]\nAdmin ID: MM13249-GANDI\nAdmin Name: Michael Mazzolini\nAdmin Organization:\nAdmin Street: 32 avenue du gros-chene\nAdmin City: Onex\nAdmin State\/Province:\nAdmin Postal Code: 1213\nAdmin Country: CH\nAdmin Phone: +41.227924510\nAdmin Phone Ext:\nAdmin Fax:\nAdmin Fax Ext:\nAdmin Email: [email protected]\nTech ID: MM13249-GANDI\nTech Name: Michael Mazzolini\nTech Organization:\nTech Street: 32 avenue du gros-chene\nTech City: Onex\nTech State\/Province:\nTech Postal Code: 1213\nTech Country: CH\nTech Phone: +41.227924510\nTech Phone Ext:\nTech Fax:\nTech Fax Ext:\nTech Email: [email protected]\nBilling ID: GM9389-GANDI\nBilling Name: Gilberto Mazzolini\nBilling Organization: GoldNetwork Sarl\nBilling Street: 32 avenue du gros-chene\nBilling City: Onex\nBilling State\/Province:\nBilling Postal Code: 1213\nBilling Country: CH\nBilling Phone: +41.7924510\nBilling Phone Ext:\nBilling Fax:\nBilling Fax Ext:\nBilling Email: [email protected]\nName Server: C.DNS.GANDI.NET\nName Server: B.DNS.GANDI.NET\nName Server: A.DNS.GANDI.NET\nDNSSEC: unsigned\n>>> Last update of WHOIS database: 2016-03-17T01:24:25Z <<<\n\n\"For more information on Whois status codes, please visit https:\/\/icann.org\/epp\"\n\nAccess to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy.  This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.\n\";}",
        "latest_check":"2016-03-17T22:07:08+0200"
    }
}
                                

Example:

<?php
    // Init cURL
    $curl = curl_init();
    // Set target URL
    curl_setopt($curl, CURLOPT_URL, "https://www.uptime.cam/api/v1/websites/1?apikey=1234");
    // Set the desired HTTP method (GET is default, see the documentation for each request)
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 
    // Execute the request and decode the json result into an associative array
    $response = json_decode(curl_exec($curl),true);
?>
                                



Get Websites api_1_get_websites GET

Description: Returning all sites with enabled uptime monitor

Address
https://www.uptime.cam/api/v1/websites.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
GET
Parameters
offset - integer - GET
limit - integer - GET<

Returns:

[
    {
        "id":1,
        "name":"http:\/\/android-recovery.info",
        "timeout":15,
        "upsince":"2015-12-31T20:16:02+0200",
        "lateststatus":"Online",
        "latesthttp":"200",
        "latestloadtime":"2370",
        "latestcheck":"2016-02-28T11:33:02+0200",
        "slackwebhook":"https:\/\/hooks.slack.com\/services\/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",
        "additionalemails":"[email protected]",
        "defaultnotification":true,
        "certificatestate":false,
        "loadtime":false,
        "public":false,
        "whois":{
            "id":1,
            "name":"android-recovery.info",
            "idn_name":"android-recovery.info",
            "status":"clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited",
            "nameserver":"a:3:{i:0;s:15:\"c.dns.gandi.net\";i:1;s:15:\"b.dns.gandi.net\";i:2;s:15:\"a.dns.gandi.net\";}",
            "created":"2014-06-03T11:18:12+0300",
            "changed":"2016-02-04T22:45:05+0200",
            "expires":"2017-06-03T11:18:12+0300",
            "registered":true,
            "dnssec":false,
            "whoisserver":"whois.afilias.net",
            "registrar":"O:36:\"Novutec\\WhoisParser\\Result\\Registrar\":4:{s:5:\"\u0000*\u0000id\";N;s:7:\"\u0000*\u0000name\";s:9:\"Gandi SAS\";s:8:\"\u0000*\u0000email\";N;s:6:\"\u0000*\u0000url\";N;}",
            "rawdata":"a:1:{i:0;s:3131:\"Domain Name: ANDROID-RECOVERY.INFO\nDomain ID: D52911535-LRMS\nWHOIS Server:\nReferral URL: http:\/\/www.gandi.net\nUpdated Date: 2016-02-04T20:45:05Z\nCreation Date: 2014-06-03T08:18:12Z\nRegistry Expiry Date: 2017-06-03T08:18:12Z\nSponsoring Registrar: Gandi SAS\nSponsoring Registrar IANA ID: 81\nDomain Status: clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited\nRegistrant ID: MM13249-GANDI\nRegistrant Name: Michael Mazzolini\nRegistrant Organization:\nRegistrant Street: 32 avenue du gros-chene\nRegistrant City: Onex\nRegistrant State\/Province:\nRegistrant Postal Code: 1213\nRegistrant Country: CH\nRegistrant Phone: +41.227924510\nRegistrant Phone Ext:\nRegistrant Fax:\nRegistrant Fax Ext:\nRegistrant Email: [email protected]\nAdmin ID: MM13249-GANDI\nAdmin Name: Michael Mazzolini\nAdmin Organization:\nAdmin Street: 32 avenue du gros-chene\nAdmin City: Onex\nAdmin State\/Province:\nAdmin Postal Code: 1213\nAdmin Country: CH\nAdmin Phone: +41.227924510\nAdmin Phone Ext:\nAdmin Fax:\nAdmin Fax Ext:\nAdmin Email: [email protected]\nTech ID: MM13249-GANDI\nTech Name: Michael Mazzolini\nTech Organization:\nTech Street: 32 avenue du gros-chene\nTech City: Onex\nTech State\/Province:\nTech Postal Code: 1213\nTech Country: CH\nTech Phone: +41.227924510\nTech Phone Ext:\nTech Fax:\nTech Fax Ext:\nTech Email: [email protected]\nBilling ID: GM9389-GANDI\nBilling Name: Gilberto Mazzolini\nBilling Organization: GoldNetwork Sarl\nBilling Street: 32 avenue du gros-chene\nBilling City: Onex\nBilling State\/Province:\nBilling Postal Code: 1213\nBilling Country: CH\nBilling Phone: +41.7924510\nBilling Phone Ext:\nBilling Fax:\nBilling Fax Ext:\nBilling Email: [email protected]\nName Server: C.DNS.GANDI.NET\nName Server: B.DNS.GANDI.NET\nName Server: A.DNS.GANDI.NET\nDNSSEC: unsigned\n>>> Last update of WHOIS database: 2016-03-17T01:24:25Z <<<\n\n\"For more information on Whois status codes, please visit https:\/\/icann.org\/epp\"\n\nAccess to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy.  This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.\n\";}",
            "latest_check":"2016-03-17T22:07:08+0200"
        }
    },
    {
        "id":2,
        "name":"http:\/\/flyttstadning-direkt.se",
        "timeout":15,"upsince":"2016-02-09T11:41:01+0200",
        "lateststatus":"Online",
        "latesthttp":"200",
        "latestloadtime":"557",
        "latestcheck":"2016-02-28T11:33:03+0200",
        "additionalemails":"[email protected]",
        "defaultnotification":true,
        "certificatestate":false,
        "loadtime":false,
        "public":false,
        "whois":{
            "id":2,
            "name":"flyttstadning-direkt.se",
            "idn_name":"flyttstadning-direkt.se",
            "status":"ok",
            "nameserver":"a:2:{i:0;s:13:\"ns1.loopia.se\";i:1;s:13:\"ns2.loopia.se\";}",
            "created":"2014-08-06T00:00:00+0300",
            "changed":"2015-06-28T00:00:00+0300",
            "expires":"2016-08-06T00:00:00+0300",
            "registered":true,"dnssec":true,
            "whoisserver":"whois.iis.se",
            "registrar":"O:36:\"Novutec\\WhoisParser\\Result\\Registrar\":4:{s:5:\"\u0000*\u0000id\";N;s:7:\"\u0000*\u0000name\";s:9:\"Loopia AB\";s:8:\"\u0000*\u0000email\";N;s:6:\"\u0000*\u0000url\";N;}","rawdata":"a:1:{i:0;s:1128:\"# Copyright (c) 1997- IIS (The Internet Foundation In Sweden).\n# All rights reserved.\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n# Result of search for registered domain names under\n# the .se top level domain.\n# This whois printout is printed with UTF-8 encoding.\n#\nstate:            active\ndomain:           flyttstadning-direkt.se\nholder:           lsu2615-1530718\nadmin-c:          -\ntech-c:           -\nbilling-c:        -\ncreated:          2014-08-06\nmodified:         2015-06-28\nexpires:          2016-08-06\nnserver:          ns1.loopia.se\nnserver:          ns2.loopia.se\ndnssec:           signed delegation\nstatus:           ok\nregistrar:        Loopia AB\n\";}",
            "latest_check":"2016-03-17T22:07:10+0200"
        }
    },
    {
        ...
    }
]
                                

Example:

<?php
    // Init cURL
    $curl = curl_init();
    // Set target URL
    curl_setopt($curl, CURLOPT_URL, "https://www.uptime.cam/api/v1/websites.{_format}?apikey=1234");
    // Set the desired HTTP method (GET is default, see the documentation for each request)
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 
    // Execute the request and decode the json result into an associative array
    $response = json_decode(curl_exec($curl),true);
?>
                                



Add Website api_1_post_website POST

Description: Creating a new uptime monitor

Address
https://www.uptime.cam/api/v1/websites.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
POST


Update Website api_1_put_website PUT

Description: Updating an uptime monitor

Address
https://www.uptime.cam/api/v1/websites/{id}.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
PUT


Update Website /Partial/ api_1_patch_website PATCH

Description: Updating an uptime monitor

Address
https://www.uptime.cam/api/v1/websites/{id}.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
PATCH


Get Ping api_1_get_ping GET

Description: Returning Uptime.cam Ping/Check by ID

Address
https://www.uptime.cam/api/v1/ping/{id}.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
GET

Returns:

{
    "id":18429,
    "responsecode":"200",
    "datetime":"2015-12-16T19:11:01+0200",
    "online":true
}
                                

Example:

<?php
    // Init cURL
    $curl = curl_init();
    // Set target URL
    curl_setopt($curl, CURLOPT_URL, "https://www.uptime.cam/api/v1/ping/18429?apikey=1234");
    // Set the desired HTTP method (GET is default, see the documentation for each request)
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 
    // Execute the request and decode the json result into an associative array
    $response = json_decode(curl_exec($curl),true);
?>
                                



Get Pings api_1_get_pings GET

Description: Returning All Uptime.cam Pings/Checks by WebsiteId

Address
https://www.uptime.cam/api/v1/pings/{websiteId}.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
GET

Returns:

[
    {
        "id":18429,
        "responsecode":"200",
        "datetime":"2015-12-16T19:11:01+0200",
        "online":true
    },
    {
        "id":18436,
        "responsecode":"200",
        "datetime":"2015-12-16T19:26:01+0200",
        "online":true
    },
    {
        "id":18443,
        "responsecode":"200",
        "datetime":"2015-12-16T19:41:01+0200",
        "online":true
    },
    {
        "id":18450,
        "responsecode":"200",
        "datetime":"2015-12-16T19:56:01+0200",
        "online":true
    },
    {
        "id":18457,
        "responsecode":"200",
        "datetime":"2015-12-16T20:11:01+0200",
        "online":true
    }
]
                                

Example:

<?php
    // Init cURL
    $curl = curl_init();
    // Set target URL
    curl_setopt($curl, CURLOPT_URL, "https://www.uptime.cam/api/v1/pings/1?apikey=1234");
    // Set the desired HTTP method (GET is default, see the documentation for each request)
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 
    // Execute the request and decode the json result into an associative array
    $response = json_decode(curl_exec($curl),true);
?>
                                



Get Pagespeed api_1_get_pagespeed GET

Description: Returning Pagespeed Entry By ID

Address
https://www.uptime.cam/api/v1/pagespeed/{id}.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
GET

Returns:

{
    "id":1,
    "desktop":"84",
    "mobile":"71",
    "datetime":"2016-03-17T18:10:34+0200"
}
                                

Example:

<?php
    // Init cURL
    $curl = curl_init();
    // Set target URL
    curl_setopt($curl, CURLOPT_URL, "https://www.uptime.cam/api/v1/pagespeed/1?apikey=1234");
    // Set the desired HTTP method (GET is default, see the documentation for each request)
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 
    // Execute the request and decode the json result into an associative array
    $response = json_decode(curl_exec($curl),true);
?>
                                



Get Pagespeeds api_1_get_pagespeeds GET

Description: Returning All Pagespeeds By Website ID

Address
https://www.uptime.cam/api/v1/pagespeeds/{websiteId}.{_format}?apikey=11223344
Format
json/xml (default is json)
Method
GET

Returns:

[
    {
        "id":1,
        "desktop":"84",
        "mobile":"71",
        "datetime":"2016-03-17T18:10:34+0200"
    },
    {
        "id":2,
        "desktop":"83",
        "mobile":"70",
        "datetime":"2016-03-17T18:10:34+0200"
    }
]
                                

Example:

<?php
    // Init cURL
    $curl = curl_init();
    // Set target URL
    curl_setopt($curl, CURLOPT_URL, "https://www.uptime.cam/api/v1/pagespeeds/1?apikey=1234");
    // Set the desired HTTP method (GET is default, see the documentation for each request)
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 
    // Execute the request and decode the json result into an associative array
    $response = json_decode(curl_exec($curl),true);
?>