Add Camera
curl --request POST \
--url https://apigw.bienport.com/api/camera/add \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'OrganizationId: <organizationid>' \
--data '
{
"brand": "IMOU",
"deviceSerial": "6C0511EPAJC9B32",
"name": "My Camera",
"organizationId": 128001,
"securityCode": "A877B022",
"ncCode": "012",
"subscriptionId": 12
}
'import requests
url = "https://apigw.bienport.com/api/camera/add"
payload = {
"brand": "IMOU",
"deviceSerial": "6C0511EPAJC9B32",
"name": "My Camera",
"organizationId": 128001,
"securityCode": "A877B022",
"ncCode": "012",
"subscriptionId": 12
}
headers = {
"Authorization": "<authorization>",
"OrganizationId": "<organizationid>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
OrganizationId: '<organizationid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
brand: 'IMOU',
deviceSerial: '6C0511EPAJC9B32',
name: 'My Camera',
organizationId: 128001,
securityCode: 'A877B022',
ncCode: '012',
subscriptionId: 12
})
};
fetch('https://apigw.bienport.com/api/camera/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigw.bienport.com/api/camera/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'brand' => 'IMOU',
'deviceSerial' => '6C0511EPAJC9B32',
'name' => 'My Camera',
'organizationId' => 128001,
'securityCode' => 'A877B022',
'ncCode' => '012',
'subscriptionId' => 12
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"OrganizationId: <organizationid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apigw.bienport.com/api/camera/add"
payload := strings.NewReader("{\n \"brand\": \"IMOU\",\n \"deviceSerial\": \"6C0511EPAJC9B32\",\n \"name\": \"My Camera\",\n \"organizationId\": 128001,\n \"securityCode\": \"A877B022\",\n \"ncCode\": \"012\",\n \"subscriptionId\": 12\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("OrganizationId", "<organizationid>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apigw.bienport.com/api/camera/add")
.header("Authorization", "<authorization>")
.header("OrganizationId", "<organizationid>")
.header("Content-Type", "application/json")
.body("{\n \"brand\": \"IMOU\",\n \"deviceSerial\": \"6C0511EPAJC9B32\",\n \"name\": \"My Camera\",\n \"organizationId\": 128001,\n \"securityCode\": \"A877B022\",\n \"ncCode\": \"012\",\n \"subscriptionId\": 12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.bienport.com/api/camera/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["OrganizationId"] = '<organizationid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"brand\": \"IMOU\",\n \"deviceSerial\": \"6C0511EPAJC9B32\",\n \"name\": \"My Camera\",\n \"organizationId\": 128001,\n \"securityCode\": \"A877B022\",\n \"ncCode\": \"012\",\n \"subscriptionId\": 12\n}"
response = http.request(request)
puts response.read_body{
"resourceId": 254,
"networkId": "6C0511EPAJC9B32",
"organizationId": 128001,
"name": "My Camera",
"brand": "IMOU",
"deviceType": "IPC",
"httpPort": "80",
"rtspPort": "554",
"deviceModelName": "Cube 4MP",
"channelNum": "1",
"privateMediaPort": "554",
"port": "37777",
"deviceModel": "IPC-K42",
"ability": "SMDH,OSD,2560x1440,mp4,MDMD,VC,WDRV2,AudioTalk,AlarmSound",
"bindStatus": "bind",
"status": "online",
"sdCardStatus": "empty",
"permission": "DevControl",
"version": "Eng_P_V2.800.0000000.12.R.20201105",
"ncCode": "018",
"securityCode": "L267B022"
}{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}This response has no body data.{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}Add Camera
POST
/
camera
/
add
Add Camera
curl --request POST \
--url https://apigw.bienport.com/api/camera/add \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'OrganizationId: <organizationid>' \
--data '
{
"brand": "IMOU",
"deviceSerial": "6C0511EPAJC9B32",
"name": "My Camera",
"organizationId": 128001,
"securityCode": "A877B022",
"ncCode": "012",
"subscriptionId": 12
}
'import requests
url = "https://apigw.bienport.com/api/camera/add"
payload = {
"brand": "IMOU",
"deviceSerial": "6C0511EPAJC9B32",
"name": "My Camera",
"organizationId": 128001,
"securityCode": "A877B022",
"ncCode": "012",
"subscriptionId": 12
}
headers = {
"Authorization": "<authorization>",
"OrganizationId": "<organizationid>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
OrganizationId: '<organizationid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
brand: 'IMOU',
deviceSerial: '6C0511EPAJC9B32',
name: 'My Camera',
organizationId: 128001,
securityCode: 'A877B022',
ncCode: '012',
subscriptionId: 12
})
};
fetch('https://apigw.bienport.com/api/camera/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigw.bienport.com/api/camera/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'brand' => 'IMOU',
'deviceSerial' => '6C0511EPAJC9B32',
'name' => 'My Camera',
'organizationId' => 128001,
'securityCode' => 'A877B022',
'ncCode' => '012',
'subscriptionId' => 12
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"OrganizationId: <organizationid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apigw.bienport.com/api/camera/add"
payload := strings.NewReader("{\n \"brand\": \"IMOU\",\n \"deviceSerial\": \"6C0511EPAJC9B32\",\n \"name\": \"My Camera\",\n \"organizationId\": 128001,\n \"securityCode\": \"A877B022\",\n \"ncCode\": \"012\",\n \"subscriptionId\": 12\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("OrganizationId", "<organizationid>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apigw.bienport.com/api/camera/add")
.header("Authorization", "<authorization>")
.header("OrganizationId", "<organizationid>")
.header("Content-Type", "application/json")
.body("{\n \"brand\": \"IMOU\",\n \"deviceSerial\": \"6C0511EPAJC9B32\",\n \"name\": \"My Camera\",\n \"organizationId\": 128001,\n \"securityCode\": \"A877B022\",\n \"ncCode\": \"012\",\n \"subscriptionId\": 12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.bienport.com/api/camera/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["OrganizationId"] = '<organizationid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"brand\": \"IMOU\",\n \"deviceSerial\": \"6C0511EPAJC9B32\",\n \"name\": \"My Camera\",\n \"organizationId\": 128001,\n \"securityCode\": \"A877B022\",\n \"ncCode\": \"012\",\n \"subscriptionId\": 12\n}"
response = http.request(request)
puts response.read_body{
"resourceId": 254,
"networkId": "6C0511EPAJC9B32",
"organizationId": 128001,
"name": "My Camera",
"brand": "IMOU",
"deviceType": "IPC",
"httpPort": "80",
"rtspPort": "554",
"deviceModelName": "Cube 4MP",
"channelNum": "1",
"privateMediaPort": "554",
"port": "37777",
"deviceModel": "IPC-K42",
"ability": "SMDH,OSD,2560x1440,mp4,MDMD,VC,WDRV2,AudioTalk,AlarmSound",
"bindStatus": "bind",
"status": "online",
"sdCardStatus": "empty",
"permission": "DevControl",
"version": "Eng_P_V2.800.0000000.12.R.20201105",
"ncCode": "018",
"securityCode": "L267B022"
}{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}This response has no body data.{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}{
"statusCode": 123,
"error": "***Exception",
"message": "Message about the error",
"path": "/api/example/path"
}Body
application/json
addCameraRequest
Add Camera Request Api Model
Camera brand.
Example:
"IMOU"
Camera serial no
Example:
"6C0511EPAJC9B32"
Camera name
Example:
"My Camera"
The organization to which the camera will be attached.
Example:
128001
Camera security code.
Example:
"A877B022"
Camera ncCode
Example:
"012"
Subscription Id
Example:
12
Response
Camera response.
Example:
254
Example:
"6C0511EPAJC9B32"
Example:
128001
Example:
"My Camera"
Example:
"IMOU"
Example:
"IPC"
Example:
"80"
Example:
"554"
Example:
"Cube 4MP"
Example:
"1"
Example:
"554"
Example:
"37777"
Example:
"IPC-K42"
Example:
"SMDH,OSD,2560x1440,mp4,MDMD,VC,WDRV2,AudioTalk,AlarmSound"
Example:
"bind"
Example:
"online"
Example:
"empty"
Example:
"DevControl"
Example:
"Eng_P_V2.800.0000000.12.R.20201105"
Example:
"018"
Example:
"L267B022"
Was this page helpful?
⌘I