攝影機 Camera

提供攝影機清單及細節API。

Get Camera List

This API retrieves a list of cameras, including the camera ID, camera name, location ID, and camera RTSP.

Endpoint: GET /cameras

Parameters:

Parameter
Description
Type
Require
Default

ids

Fetch specific ids.

String

No

-

limit

The number of cameras to retrieve per page.

integer

No

100

offset

The starting position for the result set.

integer

No

0

Example Request:

GET /cameras?limit=2&offset=0

Example Response:

[
    {
      "id": 1,
      "name": "Camera 1",
      "location_id": 1,
      "rtsp": "rtsp://example.com/camera1",
      "model_name": "",
      "coordinates": {
          "latitude": 20,
          "longitude": 120
      }
    },
    {
      "id": 2,
      "name": "Camera 2",
      "location_id": 2,
      "rtsp": "rtsp://example.com/camera2",
      "model_name": "",
      "coordinates": {
          "latitude": 20,
          "longitude": 120
      }
    }
]

Response Fields:

Field
Description
Type

id

The unique identifier for the camera.

integer

name

The name of the camera.

string

location_id

The ID of the location of the camera.

integer

rtsp

The RTSP stream URL of the camera.

string

model_name

The model name of the camera.

string

coordinates

The latitude and longitude of the camera

object


Get Camera Details

This API retrieves the details of a specific camera, including the camera ID, camera name, location ID, and camera RTSP.

Endpoint: GET /cameras/:camera_id

Path Parameters:

Parameter
Description
Type
Require

camera_id

The unique identifier for the camera.

integer

Required

Example Request:

GET /cameras/1

Example Response:

{
    "id": 1,
    "name": "Camera 1",
    "location_id": 1,
    "rtsp": "rtsp://example.com/camera1",
    "model_name": "",
    "coordinates": {
        "latitude": 20,
        "longitude": 120
    }
}

Response Fields:

Field
Description
Type

id

The unique identifier for the camera.

integer

name

The name of the camera.

string

location_id

The ID of the location of the camera.

integer

rtsp

The RTSP stream URL of the camera.

string

model_name

The model name of the camera.

string

coordinates

Latitude and longitude of the camera

object

Last updated