Network Cameras - Delete
- 04 Jan 2024
- 1 Minute to read
- Print
- DarkLight
Network Cameras - Delete
- Updated on 04 Jan 2024
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Delete Network Camera
DELETE /1/networkCameras/{network_camera_id}
Host: https://api.cogniac.io
curl -X DELETE https://api.cogniac.io/1/networkCameras/PHYNPHZ \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz" \
import requests
url_prefix = 'https://api.cogniac.io'
api_version = "1"
camera_id = 'ICGZYHV'
token = '' # add your token here
headers = {'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'}
url = f'{url_prefix}/{api_version}/networkCameras/{camera_id}'
res = requests.delete(url, headers=headers)
if res.status_code == 204:
print(f"Status code = {res.status_code}")
print(f"Camera {camera_id} was deleted successfully.")
else:
print(f"Error: {res.status_code}, {res.text}")
Status code = 204
Camera ICGZYHV was deleted successfully.
Network Cameras Must Be Inactive Before Deletion
You must transition an application to 'inactive' before you can delete a Network Camera
Enable/Disable network cameras associated with a gateway
POST /1/gateways/{gateway_id}/networkCameras
Host: https://api.cogniac.io
Input
{
'network_camera_id' : [list of camera ids] OR 'all'
'active' : True/False
}
Response
{
'status':'success'
}
Was this article helpful?