Obter Usuário via CardNo
Por meio da chamada abaixo é possível obter o usuário via seu Código de Cartão (CardNo).
Requisição - GET
http://192.168.1.201/cgi-bin/AccessCard.cgi?action=list&CardNoList[0]=12EA3004
param | type | description |
---|---|---|
list * | String | Comando para Listar Usuário |
CardNoList * | String | CardNo, exemplo: 12EA3004 |
Exemplo de Retorno - text/plain
Users[0].Authority=2
Users[0].CitizenIDNo=123456789012345678
Users[0].Doors[0]=0
Users[0].FirstEnterDoors[0]=0
Users[0].FirstEnterDoors[1]=1
Users[0].IsFirstEnter=false
Users[0].Password=234
Users[0].SpecialDaysSchedule[0]=255
Users[0].TimeSections[0]=255
Users[0].UseTime=200
Users[0].UserID=5
Users[0].UserName=test
Users[0].UserStatus=0
Users[0].UserType=0
Users[0].VTOPosition=
Users[0].ValidFrom=2019-01-02 00:00:00
Users[0].ValidTo=2037-01-02 01:00:00
Exemplos
import requests
device_ip = '10.1.35.144'
username = 'admin'
password = 'acesso1234'
url = "http://{}/cgi-bin/AccessCard.cgi?action=list&CardNoList[0]=6710BF1E".format(
str(device_ip),
)
digest_auth = requests.auth.HTTPDigestAuth(username, password)
rval = requests.get(url, auth=digest_auth, stream=True, timeout=20, verify=False)
print(rval.text)