Breadcrumbs

EventsListApi. Android

Api to get all user's events

Get cameras with analytics

Get list of cameras by page and search if needed where user has analytics on.

@GET(CAMERAS_WITH_ANALYTICS)
suspend fun getCamerasList(
    @Query(SEARCH) search: String? = null,
    @Query(FILTER) filter: String = "analytics",
    @Query(PAGE) page: String = "1"
): VMSResponseCameras

Events

Get system events

Get the list of system events

@GET(EVENTS)
fun getEventsSystem(
    @Query(PAGE) page: String,
    @Query(CAMERAS_ARRAY) cameras: List<Int>? = null,
    @Query(SORT) sort: String = "created_at",
    @Query(DIR) dir: String = "desc", // 'desc' by default or 'asc'
    @Query(DATE) date: String?,
    @Query(TIMEZONE) timezone: String?,
    @Query(FROM) from: String?,
    @Query(TO) to: String?,
): VMSApiResponseEvents

Get user's events

@GET(MARKS)
fun getEventsMarks(
    @Query(PAGE) page: String,
    @Query(CAMERAS_ARRAY) cameras: List<Int>? = null,
    @Query(SORT) sort: String = "created_at",
    @Query(DIR) dir: String = "desc",// 'desc' by default or 'asc'
    @Query(DATE) date: String?,
    @Query(TIMEZONE) timezone: String?,
    @Query(FROM) from: String?,
    @Query(TO) to: String?,
): VMSApiResponseEvents

Get analytics events

@GET(ANALYTIC_CASE_EVENTS)
fun getEventsAnalytic(
    @Query(PAGE) page: String? = null,
    @Query(EVENTS_ARRAY) events: List<String>? = null,
    @Query(ANALYTIC_TYPES) types: List<String>? = null,
    @Query(CAMERAS_ARRAY) cameras: List<Int>? = null,
    @Query(IDS_ARRAY) cases: List<Int>? = null,
    @Query(DIR) dir: String = "desc", // 'desc' by default or 'asc'
    @Query(DATE) date: String?,
    @Query(TIMEZONE) timezone: String?,
    @Query(FROM) from: String?,
    @Query(TO) to: String?
): VMSApiResponseEvents

Get analytics cases

Get all cases available for current eventTypes. See VMSStatics to get all available event types.

@GET(ANALYTIC_CASE)
suspend fun getAnalyticCases(@Query(TYPES_ARRAY) types: List<String>): VMSAnalyticFilters

Information you need to make requests to get events. Every list has not required params:

@Query(PAGE) page: String? = null,
@Query(EVENTS_ARRAY) events: List<String>? = null,
@Query(ANALYTIC_TYPES) types: List<String>? = null,
@Query(CAMERAS_ARRAY) cameras: List<Int>? = null,
@Query(IDS_ARRAY) cases: List<Int>? = null,
@Query(DIR) dir: String = "desc", // 'asc' or 'desc'
@Query(DATE) date: String?,
@Query(TIMEZONE) timezone: String?,
@Query(FROM) from: String?,
@Query(TO) to: String?