Skip to main content
Skip table of contents

EventsListApi. iOS

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.

CODE
getCamerasWithAnalytics(page: Int, search: String?, completion: (PaginatedResponse<VMSCamera>?, VMSApiError?))

Events

Get marks

Get the list of mark.

CODE
getMarks(page: Int, request: VMSEventsRequest, completion: (PaginatedResponse<VMSEvent>?, VMSApiError?))

Get events

Get the list of events.

CODE
getEvents(page: Int, request: VMSEventsRequest, completion: (PaginatedResponse<VMSEvent>?, VMSApiError?))

Get analytic events

Get the list of analytic events.

CODE
getAnalyticEvents(page: Int, request: VMSEventsAnalyticRequest, completion: @escaping (PaginatedResponse<VMSEvent>?, VMSApiError?) -> Void)

Get analytics cases

Get all cases of specific analytic cases types. See StaticsApi to get all available analytic cases types.

CODE
getAnalyticCases(page: Int, analyticCasesTypes: [String], completion: @escaping (PaginatedResponse<VMSAnalyticCase>?, VMSApiError?) -> Void)

Information you need to make requests to get events

CODE
public struct VMSEventsRequest {
    public let cameraIds: [Int]
    public let types: [String]
    public let sortDirection: VMSSortDirection
    public let timePeriod: VMSEventTimePeriod?
}

types - if you want to get marks then send marks types. In case you want to get events list sent here event types. See StaticsApi for more details

timePeriod - time period from which you want to take events from. Can be specific or setManualy, in case of setManualy set from and to dates respectively

CODE
public struct VMSEventsAnalyticRequest {
    public let eventNames: [String]
    public let caseIds: [Int]
    public let cameraIds: [Int]
    public let analyticEventTypes: [String]
    public let sortDirection: VMSSortDirection
    public let timePeriod: VMSEventTimePeriod?
}

analyticEventTypes - analytics event types. See StaticsApi for more details

eventNames - event name you get from availableEvents of VMSAnalyticCase object

timePeriod - time period from which you want to take events from. Can be specific or setManualy, in case of setManualy set from and to dates respectively

CODE
public enum VMSSortDirection: String {
    case ascending = "asc"
    case descending = "desc"
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.