Log and History

Pre-requisite *The user has to be signed in to perform the following operations. *The user should have an active pro-monitoring plan activated on the space.


Getting the Logs

To get the past logs of the system, The following method can be used:

  • spaceId (required): The space id for which the logs are to be fetched.
  • from (required): The start time from logs to be fetched from.
  • to (required): The end time up-to which the logs have to be fetch.
  • skip (required): The number of logs to be skipped in order for pagination.
InstaVision.securityServices.getLogs(
  spaceId = "spaceId",
  from = 123123123L,
  to = 123123123L,
  skip = 123123L,
  onSuccess = { logs ->
    // A list of logs between the time specified.
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)