Usage

This function is used to get a list of events that meet specific criteria.

Most commonly, this is a date range, but you can also limit other factors such as the sources of data you want to search through.

You can set a number of hours instead of a fixed date range. This will return data from the most recent 'x' hours of time.

Details

DetailValue
GroupAsset
From Server Version2024.0.0
PermissionGuest
MethodsGET or POST
Parameters
ParameterNotesMeaning
fromUTC Date (YYYY-mm-dd HH:MM:SS)Starting Date
toUTC Date (YYYY-mm-dd HH:MM:SS)Ending Date
hoursNumber (optional)Relative Number of Hours
searchStringSearch Text
sourcesStringList of source names (2025.0.2+)
formatString (xml)Either 'xml' or 'json'

Examples

Fixed Time Range
http://ardiserver.com/api/events/search?start=2025-01-01 10:00:00&end=2025-01-02 10:00:00&search=Batch

Searches for any events with 'Batch' in the name on the first day of 2025 after 10:00 UTC.

Success (XML)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<events>
    <event name="Batch 2003" start="2025-01-01 12:42:55" end="2025-01-01 13:22:16">
        <prop name="product">Plain Sugar Cookies</prop>
    </event>
</events>
Success (JSON)
[
   { 
      "name": "Batch 2003", 
      "start": "2025-01-01 12:42:55",
      "end": "2025-01-01 13:22:16",
      "product": "Plain Sugar Cookie"
   }
]
Relative Time Range
http://ardiserver.com/api/events/search?hours=24&search=Breakdown&source=Downtime

Searches for any events with 'Breakdown' in the name over the last 24 hours. It only searches the source called 'downtime'.