A valid API token must be passed with every request. You can pass the token either as a parameter or as the username part of HTTP Basic Auth. The examples on this page will leave out the token. For examples of calls using the token, see the Getting Started section of the API Overview. For the curl calls in the examples listed below you can add -u {your token}: to the curl command to pass the token in Basic Auth.
The account ID of your primary account is tied to your token, so for calls related to your primary account you do not need to include the account ID in API calls. For calls related to your SubAccounts, the account ID of the SubAccount should be passed in the customerid parameter. This is discussed further in the Record IDs section of the API Overview.
The reference list below is organized by Resource and Action. The following resources are supported:
If the action is GET, PUT, or DELETE, you can use the HTTP method to specify them directly. For other actions, include a parameter "action" to set the action. Alternatively, you can also set GET, PUT, and DELETE using the action parameter as well, which is useful if you are working in an environment that does not easily allow you to set the HTTP method.
The API supports two ways of passing in the parameters. You can put them in the querystring as shown in the accounts PUT example, or you can send them in a JSON object named json, as shown in the contacts PUT example. The two syntaxes are interchangable. In both cases, you only need to include fields listed as "required." "Optional" fields only need to be included if you are setting the value for that parameter.
{ "_id": "201205102227VZ6XU", "type": "customer", "customer_name": "My Company Name", "creation_date": 1336626000000, "status": "Active", "timezone": "-7.0", "nextBillingDate": "2012-05-15", "defaultlocations": [ "nam" ] }
{ "201205050153W2Q4C": { "parent": 5, "name": "Peter Provider", "status": "Active", "count": 120 }, "201204251942S197J": { "name": "Courageous Charlie", "status": "Active", "count": 31 }
{ "_id": "201205102227VZ6XU", "type": "customer", "customer_name": "My Company Name", "creation_date": 1336626000000, "status": "Suspend", "timezone": "-5.0", "defaultlocations": [ "nam" ] }
{ "_id": "201205102227VZ6XU", "type": "customer", "parent": "20120425194336LEV", "customer_name": "My Company Name", "creation_date": 1336626000000, "status": "Active", "emailme":true, "timezone": "3.0", "defaultlocations": [ "eur" ] }
{"success":"Records queued for deletion."}
{ "201205050153W2Q4C-BKPGH": { "_id": "201205050153W2Q4C-BKPGH", "type": "contact", "customer_id": "201205050153W2Q4C", "name": "Foo Bar", "custrole": "owner", "addresses": { "K5SP9CQP": { "address": "foo@example.com", "status": "new" } } } }
{ "_id": "201205050153W2Q4C-BKPGH", "type": "contact", "customer_id": "201205050153W2Q4C", "name": "Foo Test", "custrole": "view", "sdomain": "nodeping.com", "addresses": { "K5SP9CQP": { "address": "foo@example.com", "type": "email" }, "9ZODE0VF": { "address": "sam@example.com", "type": "email", "suppressup": true } } }
{"ok":true,"id":"201205050153W2Q4C-LZ1UI"}
{"success":true}
{ "201205050153W2Q4C-G-3QJWG": { "type": "group", "customer_id": "201205050153W2Q4C", "name": "Example Group", "members": [ "SLS78SDG", "9ZODE0VF" ] } ... }
{ "_id": "201205050153W2Q4C-G-1ZIYU", "type": "group", "customer_id": "201205050153W2Q4C", "name": "An Example Group", "members": [ "9GJ7EHJX", "GFRWVKD9" ] }
{"ok":true,"id":"201205050153W2Q4C-G-1ZIYU"}
{ "monday": { "time1": "6:00", "time2": "18:00", "exclude": 0 }, "tuesday": { "time1": "6:00", "time2": "18:00", "exclude": 0 }, "wednesday": { "time1": "6:00", "time2": "18:00", "exclude": 0 }, "thursday": { "time1": "6:00", "time2": "18:00", "exclude": 0 }, "friday": { "time1": "6:00", "time2": "18:00", "exclude": 0 }, "saturday": { "time1": "6:00", "time2": "18:00", "exclude": 0 }, "sunday": { "time1": "6:00", "time2": "18:00", "exclude": 0 } }
{"ok":true,"id":"201205050153W2Q4C"}
{"ok":true,"id":"201205050153W2Q4C"}
{ "_id": "201205050153W2Q4C-0J2HSIRF", "_rev": "37-8776f919267df3973fdb33cba0a8dd09", "customer_id": "201205050153W2Q4C", "label": "Site 1", "interval": 1, "notifications": [], "type": "HTTP", "status": "assigned", "modified": 1336759793520, "enable": "active", "public": false, "parameters": { "target": "http://www.example.com/", "threshold": "5", "sens": "2" }, "created": 1336185808566, "queue": "bINPckIRdv", "uuid": "4pybhg6m-4v1y-4enn-8tz5-tvywydu6h04k", "state": 0, "firstdown": 1336185868566 }
"fields": { "LSGWNS": { "name": "processmem.rss", "min":10000000, "max":999999999} }
"sendheaders": { "Content-Type": "application/json" }
{ "_id": "201205050153W2Q4C-1FOC0YYM", "_rev": "49-5069940f2a95fc6ae5564e329da755bd", "customer_id": "201205050153W2Q4C", "label": "Site 2", "interval": 1, "notifications": [ { "SKTUSP": "Days" } ], "type": "HTTP", "status": "modified", "modified": 1337744587374, "enabled": "active", "public": false, "parameters": { "target": "http://www.example.com/index.html", "threshold": 4, "sens": "2" }, "state": 1, "firstdown": false }
{"ok":true,"id":"201205050153W2Q4C-0J2HSIRF"}
[{ "_id":"201205050153W2Q4C-0J2HSIRF-1345313038648", "ci":"201205050153W2Q4C", "t":"DNS", "tg":"8.8.8.8", "th":"5", "i":"5", "ra":"1345313029252", "q":"caRRa3op0v", "s":1345313038648, "sc":"Success", "su":true, "rt":77, "e":1345313038725, "l":{"1345313038648":"ca"} }
{ "2012-10": { "enabled": 2678400000, "down": 35210534, "uptime": 98.685 }, "2012-11": { "enabled": 585947750, "down": 248109, "uptime": 99.958 }, "total": { "enabled": 3264347750, "down": 35458643, "uptime": 98.914 } }