Edge-to-edge camera pairing API
This API is based on the Device Configuration API framework. For guidance on how to use these APIs, please refer to Device Configuration APIs.
This API is in BETA stage and provided for testing purposes. It is subject to backward-incompatible changes, including modifications to its functionality, behavior and availability. The API should not be used in production environments.
Overview
With the edge-to-edge camera pairing API, you can pair your device to an external camera to view video from the external camera on your device.
Authentication
For detailed information on how to authenticate requests to this API, please refer to Authentication.
Use cases
Pair an external camera to a device
This example shows how to pair an external camera to a device. Currently you can only add one camera pairing.
Example request
curl -X 'POST' \
'/config/rest/camera-pairing/v1beta/camerapairings' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"address": "string",
"description": "string",
"password": "string",
"streamingprotocol": "SRTSP",
"username": "string",
"verifycertificate": true
}
}'
Example successful response
password is not included in the response for security reasons.
{
"status": "success",
"data": {
"address": "string",
"description": "string",
"id": "CameraPairing-1717587392-934150",
"productmodel": "I7010-VE",
"productname": "AXIS I7010-VE Network Intercom",
"status": "Paired",
"streamingprotocol": "SRTSP",
"username": "string",
"verifycertificate": true
}
}
Example failure response
{
"error": {
"code": 0,
"message": "string"
},
"status": "string"
}
Unpair an external camera from a device
This example shows how to unpair an external camera from a device by specifying the ID of the camera pairing.
Example request
curl -X 'DELETE' \
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1717585565-843505' \
-H 'accept: application/json'
Example successful response
{
"status": "success"
}
Example failure response
{
"error": {
"code": 0,
"message": "string"
},
"status": "string"
}
Get current camera pairing settings
This example shows how to get the current camera pairing settings by specifying the ID of the camera pairing.
Example request
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1717587844-211730' \
-H 'accept: application/json'
Example successful response
{
"status": "success",
"data": {
"address": "string",
"description": "string",
"id": "CameraPairing-1717587844-211730",
"productmodel": "I7010-VE",
"productname": "AXIS I7010-VE Network Intercom",
"status": "Paired",
"streamingprotocol": "SRTSP",
"username": "string",
"verifycertificate": true
}
}
Example failure response
{
"error": {
"code": 0,
"message": "string"
},
"status": "string"
}
Modify an existing camera pairing
This example shows how to modify the address, username, password, description, streamingprotocol, and verifycertificate of the current camera pairing. You need to specify the ID of the camera pairing and the property you want to modify.
Example request to modify the address
curl -X 'PATCH' \
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1717585565-843505/address' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"data": "string"
}'
Example request to modify the username
curl -X 'PATCH' \
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1717585565-843505/username' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"data": "string"
}'
Example request to modify the password
curl -X 'PATCH' \
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1717585565-843505/password' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"data": "string"
}'
Example request to modify the description
curl -X 'PATCH' \
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1731406548-55051/description' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"data": "string"
}'
Example request to modify the streamingProtocol setting
curl -X 'PATCH' \
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1731406548-55051/streamingprotocol' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"data": "SRTSP"
}'
Example request to modify the verifyCertificate setting
curl -X 'PATCH' \
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1731406548-55051/verifycertificate' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"data": true
}'
Example successful response
{
"status": "success"
}
Example failure response
{
"error": {
"code": 0,
"message": "string"
},
"status": "string"
}
Get current camera pairing status
This example shows how to get the current status of the camera pairing by specifying the ID of the camera pairing.
Example request
curl -X 'GET' \
'/config/rest/camera-pairing/v1beta/camerapairings/CameraPairing-1717585565-843505/status' \
-H 'accept: application/json'
Example successful response
{
"status": "success",
"data": "string"
}
If Error is returned, use Get current camera pairing settings to get more information about the error.
Example failure response
{
"error": {
"code": 0,
"message": "string"
},
"status": "string"
}
API definition
Structure
camera-pairing.v1 (Root Entity)
camerapairings (Entity Collection)
address (Property)
description (Property)
id (Property)
password (Property)
productmodel (Property)
productname (Property)
selectedVideoChannel (Property)
status (Property)
streamingprotocol (Property)
username (Property)
verifycertificate (Property)
videoChannels (Property)
Entities
camera-pairing.v1
- Description: The configuration of edge-to-edge camera pairing.
- Type: Singleton
- Operation:
GET
- Attributes:
- Dynamic support: No
camera-pairing.v1.camerapairings
- Description: Camera pairing
- Type: Collection (Key property:
id) - Operation:
GETADD- Permissions: admin - Required properties:address,username,password,streamingprotocol,verifycertificate,descriptionREMOVE- Permissions: admin
Properties
address
- Description: Address for the camera pairing.
- Datatype: Address
- Operations:
SET- Permissions: admin
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
description
- Description: Description of the paired camera.
- Datatype: description
- Operations:
SET- Permissions: admin
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
id
- Description: The unique ID generated automatically for the camera pairing.
- Datatype: id
- Operations:
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
password
- Description: Password for the camera pairing.
- Datatype: password
- Operations:
SET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
productModel
- Description: The product model of the paired camera.
- Datatype: productModel
- Operations:
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
productName
- Description: The full product name of the paired camera.
- Datatype: productName
- Operations:
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
selectedVideoChannel
-
Description: Video Channel to pull the stream from on the paired camera.
-
Datatype: SelectedVideoChannel
-
Operations
GET- Permissions: admin
SET- Permissions: admin
-
Attributes
- Nullable: No
- Dynamic Support: No / Dynamic Enum: No / Dynamic Range: No
-
status -
Description: Current status of the camera pairing.
-
Datatype: CameraPairingStatus
-
Operations:
GET- Permissions: admin
-
Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
streamingProtocol
- Description: Streaming protocol used for the camera pairing (RTSP or SRTSP).
- Operations:
SET- Permissions: admin
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
username
- Description: Username for the camera pairing.
- Datatype: username
- Operations:
SET- Permissions: admin
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
verifyCertificate
- Description: Indicates whether to verify the certificates. It is only useful when
streamingprotocolis set toSRTSP. - Datatype: boolean
- Operations:
SET- Permissions: admin
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range: No
videoChannels
- Description: Video channels available on the paired camera.
- Datatype: videoChannels
- Operations:
GET- Permissions: admin
- Attributes:
- Nullable: No
- Dynamic support: No / Dynamic Enum: No / Dynamic Range:
Actions
This entity has no actions.
Data types
Address
{
"description": "Address for the camera pairing",
"maxLength": 64,
"type": "string"
}
CameraPairingStatus
{
"description": "Current status of the camera pairing",
"enum": ["NOT_PAIRED", "PAIRED", "ERROR", "CONNECTING"],
"type": "string"
}
NOT_PAIRED: The device is not paired to an external camera.PAIRED: The device is paired to an external camera and the streaming works fine.ERROR: The device is paired to an external camera but there is some problem with the streaming.CONNECTING: The device is connecting to the external camera.
CameraPairingStreamingProtocol
{
"description": "Streaming protocol used for the camera pairing",
"enum": ["RTSP", "SRTSP"],
"type": "string"
}
Description
{
"description": "Description of the paired camera",
"maxLength": 128,
"type": "string"
}
ID
{
"description": "The unique ID generated automatically for the camera pairing",
"maxLength": 64,
"type": "string"
}
Password
{
"description": "Password for the camera pairing",
"maxLength": 64,
"type": "string"
}
ProductModel
{
"description": "The product model of the paired camera",
"maxLength": 64,
"type": "string"
}
ProductName
{
"description": "The full product name of the paired camera",
"maxLength": 64,
"type": "string"
}
SelectedVideoChannel
{
"description": "Video Channel to pull the stream from on the paired camera",
"type": "string",
"maxLength": 64
}
Username
{
"description": "Username for the camera pairing",
"maxLength": 64,
"type": "string"
}
VideoChannels
{
"description": "Array of strings representing video channel names on the paired device.",
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
The Edge-to-edge camera pairing API enables pairing a device with an external camera, allowing the device to display video from the paired camera.
Error codes
| Error code | Error message | Description |
|---|---|---|
101 | The specified address is already assigned to the device itself. | Occurs when you try to create a camera pairing to the device itself. |
102 | The specified address is not valid. | Occurs when the specified address is not a valid IPv4/IPv6 address, or a DNS name. |
104 | Maximum number of camera pairings reached. | Occurs when you try to create a second camera pairing. |
106 | Lost connection | Streaming connection is lost. |
107 | Unauthorized | Unauthorized streaming. |
108 | Could Not Connect | Couldn't connect to streaming. |