Get Alerts for a User

Description:

This API method retrieves user alerts. Your can get user alerts based on a particular alert category. You can filter for the number of alerts, only, by setting value of the parameter count_only as true.

Usage:

http://localhost:3000/aspera/orchestrator/api/alerts/?login=admin&password=admin&count_only=true
http://localhost:3000/aspera/orchestrator/api/alerts/?login=admin&password=admin&count_only=true&category=user
http://localhost:3000/aspera/orchestrator/api/alerts/?login=admin&password=admin&category=user

Sample Returned XML:

<?xml version="1.0" encoding="UTF-8"?>
<alerts type="array">
    <alert>
        <id type="integer">1</id>
        <category-id type="integer">2</category-id>
        <alert-header nil="true"/>
        <alert-description>User 'admin' logged off</alert-description>
        <created-at type="dateTime">2017-04-06T23:09:43Z</created-at>
        <updated-at type="dateTime">2017-04-06T23:09:43Z</updated-at>
    </alert>
    <alert>
        <id type="integer">2</id>
        <category-id type="integer">2</category-id>
        <alert-header nil="true"/>
        <alert-description>User 'admin' successfully logged in from IP: '127.0.0.1' using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Firefox/45.0'</alert-description>
        <created-at type="dateTime">2017-04-06T23:09:47Z</created-at>
        <updated-at type="dateTime">2017-04-06T23:09:47Z</updated-at>
    </alert>
    <alert>
        <id type="integer">3</id>
        <category-id type="integer">2</category-id>
        <alert-header nil="true"/>
        <alert-description>User 'admin' logged off</alert-description>
        <created-at type="dateTime">2017-04-06T23:09:51Z</created-at>
        <updated-at type="dateTime">2017-04-06T23:09:51Z</updated-at>
    </alert>
    <alert>
        <id type="integer">4</id>
        <category-id type="integer">2</category-id>
        <alert-header nil="true"/>
        <alert-description>User 'admin' successfully logged in from IP: '127.0.0.1' using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Firefox/45.0'</alert-description>
        <created-at type="dateTime">2017-04-07T17:06:07Z</created-at>
        <updated-at type="dateTime">2017-04-07T17:06:07Z</updated-at>
    </alert>
    <alert>
        <id type="integer">5</id>
        <category-id type="integer">2</category-id>
        <alert-header nil="true"/>
        <alert-description>User 'admin' successfully logged in from IP: '127.0.0.1' using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Firefox/45.0'</alert-description>
        <created-at type="dateTime">2017-04-10T04:10:06Z</created-at>
        <updated-at type="dateTime">2017-04-10T04:10:06Z</updated-at>
    </alert>
    <alert>
        <id type="integer">6</id>
        <category-id type="integer">2</category-id>
        <alert-header nil="true"/>
        <alert-description>User 'admin' successfully logged in from IP: '127.0.0.1' using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Firefox/45.0'</alert-description>
        <created-at type="dateTime">2017-04-10T23:14:09Z</created-at>
        <updated-at type="dateTime">2017-04-10T23:14:09Z</updated-at>
    </alert>
    <alert>
        <id type="integer">7</id>
        <category-id type="integer">2</category-id>
        <alert-header nil="true"/>
        <alert-description>User 'admin' successfully logged in from IP: '127.0.0.1' using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Firefox/45.0'</alert-description>
        <created-at type="dateTime">2017-04-10T23:55:44Z</created-at>
        <updated-at type="dateTime">2017-04-10T23:55:44Z</updated-at>
    </alert>
</alerts>

Sample Returned JSON:

[
   {
      "alert_notification": {
          "id":1,
          "category_id":3,
          "alert_header":null,
          "alert_description":"Work-order: 92493 was manually destroyed by user: admin",
          "created_at":"2017-04-23 08:05:57 UTC","updated_at":"2017-04-23 08:05:57 UTC"}},
   {
       "alert_notification": {
           "id":2,
           "category_id":4,
           "alert_header":null,
           "alert_description":"Workflow Monitor 'Cat' activated",
           "created_at":"2017-04-23 16:19:42 UTC",
           "updated_at":"2017-04-23 16:19:42 UTC"}},
   {
       "alert_notification":  {
           "id":3,
           "category_id":4,    
           "alert_header":null,
           "alert_description":"Workflow Monitor 'Dog' activated",    
           "created_at":"2017-04-23 16:19:44 UTC",
           "updated_at":"2017-04-23 16:19:44 UTC"}}
]