home

Mobile Endpoint Security

Lookout Product Documentation

Find answers about using and optimizing Lookout products.

Using the Mobile Risk API

The Mobile Risk API takes the query parameters outlined later in this guide in the Query Parameter Reference. There are two primary ways to query the API:

  1. Treat events as a feed. This method is effective when your application is polling for the most recent events.
    Specify the streamPosition value returned from your previous query to retrieve the events that have occurred since your last poll.

    Query the API endpoints using streamPosition and limit in combination with filter parameters such as startTime, endTime, actorId, targetId, etc. Sort results using the ascending Boolean parameter.

    This returns up to limit events that match the filters and follow the specified streamPosition, as well as a new streamPosition for use in subsequent requests, and a Boolean, moreEvents, that indicates whether there are more events in the stream.

  2. Treat events as a database.
    This method is effective when your application is pulling pages of historical events. Use offset and limit to paginate through events.

    Query the API endpoints using offset and limit in combination with filter parameters such as startTime, endTime, actorId, targetId, etc. Sort results using sortBy and order.

    The API matches the set of events that meet all filter criteria, returning that number as totalCount if the query includes an offset parameter. It then skips the first offset number of that subset, returning events afterwards until reaching the limit.