Skip to content

AXIS P8815-2 3D People Counter - GET & POST for ocupancy #84

Closed Answered by alexandrududuman
alexandrududuman asked this question in General
Discussion options

You must be logged in to vote

I looked at some previous threads, I made it, I'm posting here for others who may be in the same situation.

get.py:

import requests
import json
from requests.auth import HTTPDigestAuth

cam_user = 'root'
cam_pass = 'pass'
auth=HTTPDigestAuth(cam_user, cam_pass)

url = "http://HOST/a3dpc/api/occupancy"

response = requests.get(url, auth=auth)

print(response.status_code)
print(response.text)

post.py:

import requests
import json
from requests.auth import HTTPDigestAuth

cam_user = 'root'
cam_pass = 'pass'
auth=HTTPDigestAuth(cam_user, cam_pass)

url = "http://HOST/axis-cgi/a3dpc.cgi"

payload = {
"apiVersion": "0.1",
"context": "95eb9c7a-5b30-4b78-aafd-eeaec4e87886",
"method": "adjustOccup…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mattias-kindborg-at-work
Comment options

Answer selected by mattias-kindborg-at-work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants