cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Retrieving Alarms

No ratings

One of the signature features of the Axeda Platform is our alarm notification, signalling and auditing capabilities.   Our dashboard offers a simplified view into assets that are in an alarm state, and provides interaction between devices and operators.  For some customers the dashboard may be too extensive for their application needs.  The Axeda Platform from versions 6.6 onward provide a number of ways of interacting with Alarms to allow you to present this data to remote clients (Android, iOS, etc.) or to build extended business logic around alarm processing.

If one were to create a remote management application for Android, for example, there are the REST APIs available to interact with Assets and Alarms.  For aggregate operations where network traffic and round-trip time can be a concern, we have our Scripto API also available that allows you to use the Custom Object functionality to deliver information on many different aggregating criteria, and allow developers to get the data needed to build the applications to solve their business requirements.

Shown below is a REST API call you might make to retrieve all alarms between a certain time and date.

POST:   https://INSTANCENAME/services/v2/rest/alarm/find

<v2:AlarmCriteria xmlns:v2="http://www.axeda.com/services/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 

  <v2:date xsi:type="v2:BetweenDateQuery">

    <v2:start>2015-01-01T00:00:00.000Z</v2:start>

    <v2:end>2015-01-31T23:59:59.000Z</v2:end>

  </v2:date>

  <v2:states/>

</v2:AlarmCriteria>

 

In a custom object, this would like like the following:

import static com.axeda.sdk.v2.dsl.Bridges.*

import com.axeda.services.v2.*

import com.axeda.sdk.v2.exception.*

def q = new com.axeda.services.v2.BetweenDateQuery()

q.start = new Date()

q.end = new Date()

ac = new AlarmCriteria(date:q)

aresults = alarmBridge.find(ac)

 

Using the same API endpoint, here's how you would retrieve data by severity:

<v2:AlarmCriteria xmlns:v2="http://www.axeda.com/services/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 

  <v2:severity xsi:type="v2:GreaterThanEqualToNumericQuery">

    <v2:value>900</v2:value>

  </v2:severity>

  <v2:states/>

</v2:AlarmCriteria>

 

Or in a custom object:

import static com.axeda.sdk.v2.dsl.Bridges.*

import com.axeda.services.v2.*

import com.axeda.sdk.v2.exception.*

 

def q = new com.axeda.services.v2.GreaterThanEqualToNumericQuery()

q.value = 900

ac = new AlarmCriteria(severity:q)

aresults = alarmBridge.find(ac)

 

Currently the Query Types do not map properly in JSON objects - use XML to perform these types of queries via the REST APIs.

References:

Axeda v2 API/Services Developer's Reference Guide 6.6

Axeda Platform Web Services Developer Reference v2 REST 6.6


Axeda v2 API/Services Developer's Reference Guide 6.8

Axeda Platform Web Services Developer Reference v2 REST 6.8

Version history
Last update:
‎Apr 21, 2015 10:02 AM
Updated by:
Labels (2)