Menu

RetrieveEventByDevice

Jim

Retrieve Events by Device
Returns stored event data for a device

Path: cs-ws/resources/retrieval/eventlist Method: GET

Parameters

apikey
device_name
model_name
from ... timestamp as yyyy-mm-dd hh:hh:ss.SSS
to ... timestamp as yyyy-mm-dd hh:hh:ss.SSS
direction ...=asc|desc: controls whether timestamped data are retrieved in ascending or descending order, ascending is default
count ...=true: retrieves only the number of retrieved moments, not the moments themselves
limit ...=nnn: only up to nnn moments are retrieved. If a limit is reached for a moment series the response contains an element <next_timestamp> which can be used in a continuation of the retrieval for this time series
filter: <EventAttribute> <Operator> <Value>
Errors:

401 UNAUTHORIZED if key is invalid
404 NOT FOUND if the device is not found
Example

GET http://localhost/cs-ws/resources/retrieval/eventlist?apikey=1234&model_name=EvModel1&device_name=Test1&filter=EvAttr1%20EQ%20123 HTTP/1.1

HTTP/1.1 200 OK
<events>
    <event>
        <attribute>
            <name>EvAttr1</name>
            <value>123</value>
        </attribute>
        <attribute>
            <name>EvAttr2</name>
        </attribute>
        <rawdata>this is the raw data</rawdata>
        <timestamp>2017-12-04 12:10:30.123</timestamp>
    </event>
    <result>
        <count>1</count>
        <limit_reached>false</limit_reached>
        <next_timestamp></next_timestamp>
    </result>
</events>

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.