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:
-
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
andlimit
in combination with filter parameters such asstartTime
,endTime
,actorId
,targetId
, etc. Sort results using theascending
Boolean parameter.This returns up to
limit
events that match the filters and follow the specifiedstreamPosition
, as well as a newstreamPosition
for use in subsequent requests, and a Boolean,moreEvents,
that indicates whether there are more events in the stream. -
Treat events as a database.
This method is effective when your application is pulling pages of historical events. Use
offset
andlimit
to paginate through events.Query the API endpoints using
offset
andlimit
in combination with filter parameters such asstartTime
,endTime
,actorId
,targetId
, etc. Sort results usingsortBy
andorder
.The API matches the set of events that meet all filter criteria, returning that number as
totalCount
if the query includes anoffset
parameter. It then skips the firstoffset
number of that subset, returning events afterwards until reaching thelimit
.