GET /API/Alerts/

Basic Intro

Using the HTTP header GET you will be able to get alerts that have been sent in regards to tests setup on the authorised account. The return order is newest alerts are shown first.

Parameters
TestID: You can pass the field "TestID" in either POST or GET with an int value to limit to alerts from a single site.
           Since: You can pass the field "Since" in either POST or GET with a linux timestamp. It will only include results SINCE that timestamp. 
Example Request
curl -H "API: [APIKey]" -H "Username: [Username]" -X GET https://app.statuscake.com/API/Alerts/?TestID=241

Example Output

The output is returned as a json array

{
    Triggered: "2013-02-25 14:42:41", // When The alert was sent. Uses GMT
    StatusCode: 0, // The Status Code
    Unix: 1361803361, // The Linux Timestamp
    Status: "Down", // The Status Logged To Trigger Alert
    TestID: 26324 // The Alert ID
},

Error Messages

If a testID is not connected to the account that API key has been provided for then the following error message will be presented

{
    "ErrNo": 1,
    "Error": "REQUEST[TestID] provided not linked to this account"
}