Skip to main content
Skip table of contents

List of all cameras

A paginated list of all cameras available to the user.

GET/api/v1/cameras

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

searchrequired

int

Search by camera address and name

statusrequired

int

Filter by status

per_pagerequired

int

Number of items per page in pagination. Default is 25

pagerequired

int

Page number in pagination

filterrequired

string

Filtering the camera list

Response

200

Returns cameras on page i of the pagination

JSON
{
  "data": [
    {
      "id": 894,
      "group_id": 190,
      "status": "inactive",
      "type": "media_server_v2",
      "start_at": "",
      "created_at": "2022-04-05 12:34:38",
      "billing_id": null,
      "pretty_name": "Camera 1",
      "lat": null,
      "lng": null,
      "azimuth": null,
      "pretty_name": "Camera 2",
      "pretty_text": "Region region, District district, City, st. Street 1",
      "short_address": "City, st. Street 1",
      "full_address": "Region region, District district, City, st. Street 1",
      "streams": [
        {
          "id": 923,
          "type": "high",
          "camera_id": 894,
          "is_preview_from_server": true,
          "is_archive_from_server": null,
          "status": "inactive",
          "has_sound": false,
          "width": null,
          "height": null
        }
      ],
      "has_sound": false,
      "is_archive_recording": true,
      "is_bridge": false,
      "is_favorite": true,
      "user_status": "active",
      "name": "Camera 1"
    },
    {
      "id": 837,
      "group_id": 124,
      "status": "active",
      "type": "media_server_v2",
      "start_at": "2022-06-06 17:24:12",
      "created_at": "2022-02-18 15:12:41",
      "billing_id": null,
      "pretty_name": "Camera 3",
      "lat": null,
      "lng": null,
      "azimuth": null,
      "pretty_name": "Camera 2",
      "pretty_text": "Region region, District district, City, st. Street 1",
      "short_address": "City, st. Street 1",
      "full_address": "Region region, District district, City, st. Street 1",
      "streams": [
        {
          "id": 844,
          "type": "high",
          "camera_id": 837,
          "is_preview_from_server": true,
          "is_archive_from_server": null,
          "status": "active",
          "has_sound": true,
          "width": 1280,
          "height": 720
        },
        {
          "id": 845,
          "type": "low",
          "camera_id": 837,
          "is_preview_from_server": true,
          "is_archive_from_server": null,
          "status": "active",
          "has_sound": true,
          "width": 640,
          "height": 360
        }
      ],
      "has_sound": true,
      "is_archive_recording": true,
      "is_bridge": false,
      "is_favorite": false,
      "user_status": "active",
      "name": "Camera 3"
    }
  ],
  "links": {
    "first": "https://vms.local/api/v1/cameras?page=1",
    "last": "https://vms.local/api/v1/cameras?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "pagination.previous",
        "active": false
      },
      {
        "url": "https://vms.local/api/v1/cameras?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "pagination.next",
        "active": false
      }
    ],
    "path": "https://vms.local/api/v1/cameras",
    "per_page": 25,
    "to": 21,
    "total": 21
  }
}
401

Authorization token not provided or invalid, see Obtaining a token

422

Returns a JSON object with an error, see Validation

JSON
{
    "message": "There won't be any informative message here",
    "errors": {
        "any_key": [
            "Here the error cause will be described"
        ]
    }
}

Example

JSON
curl -k --location --request GET 'https://vms.local/api/v1/cameras?search=int&status=int&per_page=int&page=int&filter=string' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
JavaScript errors detected

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

If this problem persists, please contact our support.