Cameras

APIs to manage an organisation's cameras.

Create camera

Link a camera to an organisation.

Securityo_auth
Request
Request Body schema: application/json
name
string
serialNumber
required
string
siteId
required
string <uuid>
Responses
201

OK.

400

Bad request.

401

Authentication failed.

403

Not allowed.

404

Not found.

409

This camera has already been claimed.

500

Failed.

post/cameras
Request samples
application/json
{
  • "name": "string",
  • "serialNumber": "string",
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1"
}
Response samples
application/json
{
  • "cameraPositionId": "37eacd70-df6f-462c-b57e-ba61d0ee7150",
  • "claimedAt": "2019-08-24T14:15:22Z",
  • "direction1Alias": "string",
  • "direction2Alias": "string",
  • "encodedFramesProportion": 0,
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "isOnline": true,
  • "lastSeenAt": "2019-08-24T14:15:22Z",
  • "lastVideoAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "networkTransmitRate": 0,
  • "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
  • "serialNumber": "string",
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "state": "running",
  • "videoBacklog": 0,
  • "videoUploadLatency": 0
}

Create/Update camera state

Change the state of a camera from running to paused or vice-versa.

Securityo_auth
Request
path Parameters
cameraId
required
string <uuid>

the camera ID of the camera.

newState
required
string

The state to which the camera will be set: running cameras are processing video and have notifications on, paused cameras are not processing video, notifications are off and can be re-activated.

Enum: "running" "paused"
Responses
201

OK.

401

Authentication failed.

403

Not allowed.

404

Not found.

422

Unprocessable entity.

500

Failed.

put/cameras/{cameraId}/state/{newState}
Request samples
Response samples
application/json
{
  • "code": 0,
  • "message": "string"
}

Create/Update camera state request

Change the state of a camera from claimed to claimed_paused or vice-versa.

Securityo_auth
Request
Request Body schema: application/json
cameraId
required
string <uuid>

the camera ID of the camera.

newState
required
string

The state to which the camera will be set: claimed cameras are processing video and have notifications on, claimed_paused cameras are not processing video, notifications are off and can be re-activated.

Enum: "claimed" "claimed_paused"
Responses
202

Accepted.

401

Authentication failed.

403

Not allowed.

404

Not found.

422

Unprocessable entity.

500

Failed.

post/put-camera-state-requests
Request samples
application/json
{
  • "cameraId": "cbc3283e-6217-4855-9934-148717cbeefe",
  • "newState": "claimed"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "msg": "string",
  • "status": "created"
}

Delete camera

Decommission a camera that is in state running or paused.

Securityo_auth
Request
path Parameters
cameraId
required
string <uuid>

the camera ID of the camera.

Responses
204

OK.

400

Bad request.

401

Authentication failed.

403

Not allowed.

404

Not found.

422

Unprocessable entity.

500

Failed.

delete/cameras/{cameraId}
Request samples
Response samples
application/json
{
  • "code": 0,
  • "message": "string"
}

Get camera

Get a camera identified by the provided camera ID.

Securityo_auth
Request
path Parameters
cameraId
required
string <uuid>

The full camera ID of a camera to be fetched.

query Parameters
includeMetrics
boolean
Default: true

Choose whether camera metrics should be included in the response or not.

Responses
200

OK.

401

Authentication failed.

403

Not allowed.

404

Not found.

422

Unprocessable entity.

500

Failed.

get/cameras/{cameraId}
Request samples
Response samples
application/json
{
  • "cameraPositionId": "37eacd70-df6f-462c-b57e-ba61d0ee7150",
  • "claimedAt": "2019-08-24T14:15:22Z",
  • "direction1Alias": "string",
  • "direction2Alias": "string",
  • "encodedFramesProportion": 0,
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "isOnline": true,
  • "lastSeenAt": "2019-08-24T14:15:22Z",
  • "lastVideoAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "networkTransmitRate": 0,
  • "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
  • "serialNumber": "string",
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "state": "running",
  • "videoBacklog": 0,
  • "videoUploadLatency": 0
}

Get camera opening hour

Get all attributes of a camera model given a camera ID.

Securityo_auth
Request
path Parameters
cameraId
required
string <uuid>

the camera ID of the camera

query Parameters
date
string <date>

Day of the year of requested Opening Hour

Responses
200

OK.

401

Authentication failed.

403

Not allowed.

404

Not found.

500

Failed.

get/cameras/{cameraId}/opening-hours
Request samples
Response samples
application/json
[
  • "2019-08-24T14:15:22Z"
]

Get live frame

Get a recent video frame from a camera.

Securityo_auth
Request
Request Body schema: application/json
required

The FrameRequest that contains the camera to fetch a frame for.

cameraId
required
string <uuid>
Responses
200

OK.

401

Authentication failed.

403

Not allowed.

404

No image available.

409

Conflict.

500

Failed.

post/frame-requests
Request samples
application/json
{
  • "cameraId": "cbc3283e-6217-4855-9934-148717cbeefe"
}
Response samples
application/json
{
  • "image": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Get video upload metrics

Get video upload metrics for the provided camera ID

Securityo_auth
Request
path Parameters
cameraId
required
string <uuid>

the camera ID of the camera

Responses
200

OK.

401

Authentication failed.

403

Not allowed.

404

Not found.

500

Failed.

get/cameras/{cameraId}/video-upload-metrics
Request samples
Response samples
application/json
{
  • "uploadSize": 0,
  • "uploadTime": 0
}

List cameras

List all claimed cameras in the fleet along with the organisations that own them.

Securityo_auth
Request
query Parameters
includeMetrics
boolean
Default: true

Choose whether camera metrics should be included in the response or not.

siteId
string <uuid>

The ID of the site whose list of associated cameras will be returned.

userId
string <uuid>

The ID of a user on whose visibility of the cameras to filter on.

state
Array of strings

The camera states to filter on.

Items Enum: "running" "paused" "decommissioned"
Responses
200

OK.

401

Authentication failed.

403

Not allowed.

422

Unprocessable entity.

500

Failed.

get/cameras
Request samples
Response samples
application/json
[
  • {
    }
]

Move camera

Move camera to new site

Securityo_auth
Request
path Parameters
cameraId
required
string
Request Body schema: application/json
siteId
required
string <uuid>
Responses
201

OK.

400

Bad request.

401

Authentication failed.

403

Not allowed.

404

Not found.

422

Unprocessable Content.

500

Failed.

post/cameras/{cameraId}/move
Request samples
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1"
}
Response samples
application/json
{
  • "cameraPositionId": "37eacd70-df6f-462c-b57e-ba61d0ee7150",
  • "claimedAt": "2019-08-24T14:15:22Z",
  • "direction1Alias": "string",
  • "direction2Alias": "string",
  • "encodedFramesProportion": 0,
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "isOnline": true,
  • "lastSeenAt": "2019-08-24T14:15:22Z",
  • "lastVideoAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "networkTransmitRate": 0,
  • "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
  • "serialNumber": "string",
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "state": "running",
  • "videoBacklog": 0,
  • "videoUploadLatency": 0
}

Patch camera

Update camera name and/or direction aliases of the camera identified by the provided camera ID.

Securityo_auth
Request
path Parameters
cameraId
required
string <uuid>

The full camera ID of a camera to be patched.

Request Body schema: application/json

Update a camera's name and/or direction alias/es.

direction1Alias
string
direction2Alias
string
name
string
Responses
200

OK.

400

Bad request.

401

Authentication failed.

403

Not allowed.

404

Not found.

422

Unprocessable entity.

500

Failed.

patch/cameras/{cameraId}
Request samples
application/json
{
  • "direction1Alias": "string",
  • "direction2Alias": "string",
  • "name": "string"
}
Response samples
application/json
{
  • "cameraPositionId": "37eacd70-df6f-462c-b57e-ba61d0ee7150",
  • "claimedAt": "2019-08-24T14:15:22Z",
  • "direction1Alias": "string",
  • "direction2Alias": "string",
  • "encodedFramesProportion": 0,
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "isOnline": true,
  • "lastSeenAt": "2019-08-24T14:15:22Z",
  • "lastVideoAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "networkTransmitRate": 0,
  • "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
  • "serialNumber": "string",
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "state": "running",
  • "videoBacklog": 0,
  • "videoUploadLatency": 0
}

Register camera

Create a camera in a registered state.

Securityo_auth
Request
Request Body schema: application/json
required
cameraId
required
string <uuid>
serialNumber
required
string
Responses
202

Accepted.

400

Bad request.

401

Authentication failed.

403

Not allowed.

404

Not found.

500

Failed.

post/register-camera-requests
Request samples
application/json
{
  • "cameraId": "cbc3283e-6217-4855-9934-148717cbeefe",
  • "serialNumber": "string"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "msg": "string",
  • "status": "created"
}