Skip to main content
Skip table of contents

CameraApi. Android

Api to get cameras information.

Get main tree

Get all cameras user has.

If request was successful you'll the list of VMSCameraTree objects.

CODE
@GET(FLAT_TREE)
suspend fun getCamerasTree(): List<VMSCameraTree>

Camera search

Get the list of cameras according to search.

If request was successful you'll the list of founded VMSCamera objects.

CODE
@GET(FLAT_TREE)
suspend fun getSearchTree(@Query("search") search: String): List<VMSCamera>

Get camera

Get specific camera information by camera's id.

If request was successful you'll get VMSCamera object.

CODE
@GET(CAMERAS_INFO)
suspend fun getCamera(@Path(ID) id: String): VMSCamera

Rename camera

Rename camera by it's id and with it's new name.

If request was successful you'll get updated VMSCamera object.

CODE
@POST(CAMERAS_RENAME)
suspend fun renameCamera(
    @Path(CAMERA) id: String,
    @Body request: VMSRenameCameraRequest
): VMSCamera

Send report

Send report if something is wrong with the camera.

See VMSStatics to get the list of possible issues in camera_issues.

If request was successful you'll get empty ResponseBody.

CODE
@POST(CAMERAS_ISSUE)
suspend fun sendReport(@Path(ISSUE_KEY) key: String, @Path(ID) id: String): ResponseBody

issue_key - id of reported issue.

id - id of camera with issue.

Get camera preview

Get camera preview of specific date. You will receive .mp4 file of camera one frame.

If request was successful you'll get url to download frame.

CODE
@GET(CAMERAS_PREVIEW)
suspend fun getCamerasPreview(
    @Path(ID) id: String,
    @Query("date") date: String? = null
): VMSUrlPreviewResponse

VMSUrlPreviewResponse

id - id of camera.

date - date of frame camera's, could be null.

JavaScript errors detected

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

If this problem persists, please contact our support.