Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

/alert/{alert_id}

Modifies a specific alert, or a channel of alerts, or all alerts for a user

Note: alert_type_id can be created/found in the settings api call

Possible Methods

GET POST PUT DELETE

Arguments

alert_id(optional)
Alert id to modify

Json Object
{
        String alert_id;
    	String event_id;
    	String channel_id;
    	String alert_type_id;
    	Date last_alert_time;
    	long next_possible_alert_time_ms;
}

 

Example
curl -b cookies.txt -X GET "http://localhost:8185/alert/532af74cb8e0870ad33d94cd" > response.txt
curl -b cookies.txt -X POST -d '{"event_id":"52e2e833e4b013563c3ea1ee", "alert_type_id":"532af8d8b8e0dd9b47dea7f8"}' "http://localhost:8185/alert" > response.txt
curl -b cookies.txt -X PUT -d '{"event_id":"52e2e833e4b013563c3ea1ee", "alert_type_id":"532af8d8b8e0dd9b47dea7f9"}' "http://localhost:8185/alert" > response.txt
curl -b cookies.txt -X DELETE "http://localhost:8185/alert/532af74cb8e0870ad33d94cd" > response.txt

 

Example Response
curl -b cookies.txt -X GET "http://localhost:8185/alert/532af911b8e0dd9b47dea7fa" > response.txt

 

 {
    "response": {
        "action": "Alert",
        "success": true,
        "message": "Return specific alert: 532af911b8e0dd9b47dea7fa",
        "time": 0
    },
    "data": {
        "alert_id": "532af911b8e0dd9b47dea7fa",
        "event_id": "52e2e833e4b013563c3ea1ee",
        "channel_id": "532851a1b8e0cd4ae4050b06",
        "alert_type_id": "532af8d8b8e0dd9b47dea7f8",
        "last_alert_time": "Mar 21, 2014 03:39:30 PM UTC",
        "next_possible_alert_time_ms": 1395502770715
    }
}
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.