Alerts Resource

DELETE /alerts

Delete one alert or a group of alerts published on the account or all the alerts if no param are passed.

To delete a given alert, the best way is to use its unique identifier "uuid".
Example of query in CURL :
curl --user 'clientId:client password' -X DELETE -k "https://api-sandbox.everyware-cloud.com/v2/alerts.xml?uuid=de9959b7-b80d-4881-bffd-0d7c93523ded"

Request Parameters
name type description default constraints
category query : eg Performance, Security, Other etc ... All params are optional, if source and startDate are omitted all alerts are deleted (and other params are ignored), if not source MUST BE SET.

To delete a single alert, source and startDate must be defined and endDate must not be defined.

 
endDate query End date of the date range requested. The parameter is expressed as a long counting the number of milliseconds since January 1, 1970, 00:00:00 GMT. The default value of 0 means no end date. Alternatively, the date can be expressed as a string following the ISO 8601 format. 0  
limit query Maximum number of entries to be deleted (default 50). Note that an error will be returned if the maximum allowed value is exceeded. 50 required
severity query : can be one of the following CRITICAL, WARNING, INFO  
source query : source of the alert to be deleted  
startDate query : date of the alert to be deleted. The parameter is expressed as a long counting the number of milliseconds since January 1, 1970, 00:00:00 GMT. The default value of 0 means no start date. Alternatively, the date can be expressed as a string following the ISO 8601 format. 0  
uuid query : unique identifier of the alert to be deleted  

Example

Request
DELETE /alerts
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /alerts

Returns the list of all the Alerts published under the account of the currently connected user.

Example of query in CURL :
curl --user 'clientId:client password' -k https://api-sandbox.everyware-cloud.com/v2/alerts.xml?severity=CRITICAL" | xmllint --format -

Request Parameters
name type description default constraints
category query : eg Performance, Security, Other etc ...  
endDate query End date of the date range requested. The parameter is expressed as a long counting the number of milliseconds since January 1, 1970, 00:00:00 GMT. The default value of 0 means no end date. Alternatively, the date can be expressed as a string following the ISO 8601 format. 0  
limit query Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 50 required
offset query Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 0 required
severity query : can be one of the following CRITICAL, WARNING, INFO  
source query : can be an asset name or System  
startDate query Start date of the date range requested. The parameter is expressed as a long counting the number of milliseconds since January 1, 1970, 00:00:00 GMT. The default value of 0 means no start date. Alternatively, the date can be expressed as a string following the ISO 8601 format. 0  
Response Body
media type data type description
application/json AlertsResult (JSON) The list of requested Messages.
application/xml alertsResult (XML)

Example

Request
GET /alerts
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "alert" : [ {
    "account" : "...",
    "uuid" : "...",
    "createdOn" : 12345,
    "createdBy" : 12345,
    "source" : "...",
    "severity" : "WARNING",
    "category" : "...",
    "code" : "...",
    "message" : "...",
    "attachment" : "..."
  }, {
    "account" : "...",
    "uuid" : "...",
    "createdOn" : 12345,
    "createdBy" : 12345,
    "source" : "...",
    "severity" : "WARNING",
    "category" : "...",
    "code" : "...",
    "message" : "...",
    "attachment" : "..."
  } ]
}
                
              

POST /alerts

Stores a new Alert under the account of the currently connected user. In this case, the provided alert will only be stored in the back-end database and it will not be forwarded to the message broker.

Request Body
media type data type description
application/xml alertCreator (XML) contains parameters for the Alert to be stored.
At present only XML is supported in the request body.
Response Body
media type data type description
application/xml alert (XML)

Example

Request
POST /alerts
Content-Type: application/xml
Accept: application/xml

                
<alertCreator xmlns="http://eurotech.com/edc/2.0">
  <account>...</account>
  <source>...</source>
  <severity>...</severity>
  <category>...</category>
  <code>...</code>
  <message>...</message>
  <attachment>...</attachment>
</alertCreator>

                
              
Response
HTTP/1.1 201 Created
Content-Type: application/xml

                
<alert xmlns="http://eurotech.com/edc/2.0">
  <account>...</account>
  <uuid>...</uuid>
  <createdOn>...</createdOn>
  <createdBy>...</createdBy>
  <source>...</source>
  <severity>...</severity>
  <category>...</category>
  <code>...</code>
  <message>...</message>
  <attachment>...</attachment>
</alert>