com.trendmicro.ds.loginspection.rest.api

## Interface IEventAPI

-     @Path(value="/events")
      public interface IEventAPI

  An interface for the event retrieval

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `DescribeEventResponse` | `describeEvent(java.lang.String sessionID, java.lang.Long eventID)` Get the Log Inspection event with the specified event ID.
    `ListEventsResponse` | `listEvents(java.lang.String sessionID, java.lang.Long eventID, java.lang.String eventIDOp, java.lang.Long eventTime, java.lang.String eventTimeOp, java.lang.Integer maxItems)` Get log inspection events.

- - ### Method Detail

    - #### describeEvent

          @GET
           @Path(value="/logInspection/{eventID}")
           @Produces(value={"application/json","application/xml"})
          DescribeEventResponse describeEvent(@CookieParam(value="sID")
                                                                                                                                                     java.lang.String sessionID,
                                                                                                                                                     @PathParam(value="eventID")
                                                                                                                                                     java.lang.Long eventID)
                                                                                                                                              throws java.lang.Exception

      Get the Log Inspection event with the specified event ID.
      Parameters:
        `eventID` - the ID of the event to fetch.
        `sessionID` - a session ID returned by the Authentication API. *
      Returns:
        a DescribeEventResponse containing the event with the specific ID
      Throws:
        `java.lang.Exception`

    - #### listEvents

          @GET
           @Path(value="/logInspection")
           @Produces(value={"application/json","application/xml"})
          ListEventsResponse listEvents(@CookieParam(value="sID")
                                                                                                                                     java.lang.String sessionID,
                                                                                                                                     @QueryParam(value="eventID")
                                                                                                                                     java.lang.Long eventID,
                                                                                                                                     @QueryParam(value="eventIDOp")
                                                                                                                                     java.lang.String eventIDOp,
                                                                                                                                     @QueryParam(value="eventTime")
                                                                                                                                     java.lang.Long eventTime,
                                                                                                                                     @QueryParam(value="eventTimeOp")
                                                                                                                                     java.lang.String eventTimeOp,
                                                                                                                                     @QueryParam(value="maxItems")
                                                                                                                                     java.lang.Integer maxItems)
                                                                                                                              throws java.lang.Exception

      Get log inspection events. Users can assign filters when querying events from DSM. The following are some notable behaviors that how DSM reacts:

      DSM only accepts proper operator/operand pairs.
      When only both an operator and an operand are properly assigned, DSM accepts the filter -- otherwise DSM ignores these improper parameters. Examples:

               eventID=100&eventIDOp='gt' -> a valid filter
               eventID=100 -> an invalid filter. DSM ignores it.
               eventIDOp='le' -> an invalid filter. DSM ignores it.

      The output events are always sorted by ID in ascending.
      DSM outputs results by counting the events from the smallest ID to the larger ID until the number of output events meets the maxItems; for instance, if DSM receives a request with either 'lt' or 'le' operator, firstly the API filter events by the filter, secondly it sorts the results by ID in ascending, and finally the API outputs events from the smallest ID until the number of output events meets the maxItems

      In the database, the ordering of ID is not equal to the ordering of LogDate.
      Sometimes DSM receives older events (e.g. yesterday's events), however, these older events' IDs are larger than newer events' IDs. When querying events by only time filter with 'ge' operator, DSM returns desired events and the corresponding lastEventID. However, it doesn't mean that in the database, all events whose ID larger than the lastEventID are older than the time filter in the query.

      Parameters:
        `sessionID` - a session ID returned by the Authentication API.
        `eventID` - the event ID to query for events. Combined with eventIDOp, the returning events can be filtered according to the ID.
        `eventIDOp` - defined the events to return. Currently supported operations include gt(greater than), ge(greater than or equal to), eq(eqaul to), lt(less than), and le(less than or equal to). If an unsupported operator is provided, the default is 'eq'.
        `eventTime` - the event time to query for events. It is represented by a long integer, which is the milliseconds since January 1, 1970, 00:00:00 GMT. Combined with eventTimeOp, the returning events can be filtered by the specific milliseconds. Please be aware that for log inspection events, the accuracy of event time is second, which means that the millisecond part of events' time in the database are always 000.
        `eventTimeOp` - defined the events to return. Currently supported operations include gt(greater than), ge(greater than or equal to), eq(eqaul to), lt(less than), and le(less than or equal to). If an unsupported operator is provided, the default is 'eq'.
        `maxItems` - the maximum events to response. The valid minimum value is 1.
      Returns:
        an ListEventsResponse, a collection of the events meet the given criteria.
      Throws:
        `java.lang.Exception`

Copyright © 2017 Trend Micro Inc. All Rights Reserved.