Alerts

Alerts are events that matched an Event Class setup for a log.

List All
List All By Log
List One
Create
Delete All
Delete

List All

Returns all alerts for the authenticated user across all the logs the user is associated with.

URL

GET /logs/alerts

Request

// This example returns the last 10

GET /logs/alerts?order=desc&pagesize=10
For all possible request parameters, see Events.

Response

Status: 200 OK

[
    {
        "id":"4dfdff994e1feb0b4c0020ef",
        "created":"\/Date(1308491673911)\/",
        "text":"A user was created",
        "link":"",
        "hash":"LiWqANduFe+cia1nMTfN+g==",
        "tags":["user","created"],
        "source":"web3",
        "log":"sample"
        "class":"created",
        "data":true,
        "geo":null,
        "value":null
    }
]
top

List All By Log

Returns all alerts for the authenticated user contained in the log identified by {logkey}.

URL

GET /logs/{logkey}/alerts

Request

// This example returns the last 10

GET /logs/foo/alerts?order=desc&pagesize=10
For all possible request parameters, see Events.

Response

Status: 200 OK

[
    {
        "id":"4dfdff994e1feb0b4c0020ef",
        "created":"\/Date(1308491673911)\/",
        "text":"A user was created",
        "link":"",
        "hash":"LiWqANduFe+cia1nMTfN+g==",
        "tags":["user","created"],
        "source":"web3",
        "log":"sample"
        "class":"created",
        "data":true,
        "geo":null,
        "value":null
    }
]
top

List One

Returns a single alert. This call will only work for alerts that are contained in the log identified by {logkey}.

URL

GET /logs/{logkey}/alerts/{id}

Request

No request data is sent

Response

Status: 200 OK

{
    "id":"4dfdff994e1feb0b4c0020ef",
    "created":"\/Date(1308491673911)\/",
    "text":"A user was created",
    "link":"",
    "hash":"LiWqANduFe+cia1nMTfN+g==",
    "tags":["user","created"],
    "source":"web3",
    "log":"sample"
    "class":"created",
    "data":true,
    "geo":null,
    "value":null
}
top

Create

Alerts are automatically generated based on Event Classes established for a log and if the authenticated user chooses to have alerts created for a specifc Event Class.

Response

Status: 400 Bad Request
top

Delete All

Removes all alerts for the authenticated user.

URL

DELETE /logs/alerts

Request

No request data is sent

Response

Status: 204 No Content
top

Delete

Removes the alert at the referenced URL. In the URL, {id} is the id of the event to remove the alert. This call will only work for alerts that are contained in the log identified by {logkey}.

URL

DELETE /logs/{logkey}/alerts/{id}

Request

No request data is sent

Response

Status: 204 No Content
top