Obter Todos Usuários
Por meio da chamada abaixo é possível obter todos usuários.
Requisição - GET
http://192.168.1.201/cgi-bin/recordFinder.cgi?action=doSeekFind&name=AccessControlCard
param | type | description |
---|---|---|
doSeekFind * | String | Comando para Finalizar Buscar |
AccessControlCard * | Number | Registros que serão buscados |
Exemplo de Retorno - text/plain
found=3
records[0].CardName=test
records[0].CardNo=
records[0].CardStatus=0
records[0].CardType=0
records[0].CitizenIDNo=123456789012345678
records[0].Doors[0]=0
records[0].DynamicCheckCode=
records[0].FirstEnter=false
records[0].Handicap=false
records[0].IsValid=false
records[0].Password=234
records[0].RecNo=2
records[0].RepeatEnterRouteTimeout=4294967295
records[0].TimeSections[0]=255
records[0].UseTime=200
records[0].UserID=6
records[0].UserType=0
records[0].VTOPosition=
records[0].ValidDateEnd=2037-01-02 01:00:00
records[0].ValidDateStart=2019-01-02 00:00:00
records[1].CardName=test
records[1].CardNo=
records[1].CardStatus=0
records[1].CardType=0
records[1].CitizenIDNo=123456789012345678
records[1].Doors[0]=0
records[1].DynamicCheckCode=
records[1].FirstEnter=false
records[1].Handicap=false
records[1].IsValid=false
records[1].Password=234
records[1].RecNo=3
records[1].RepeatEnterRouteTimeout=4294967295
records[1].TimeSections[0]=255
records[1].UseTime=200
records[1].UserID=7
records[1].UserType=0
records[1].VTOPosition=
records[1].ValidDateEnd=2037-01-02 01:00:00
records[1].ValidDateStart=2019-01-02 00:00:00
records[2].CardName=test
records[2].CardNo=
records[2].CardStatus=0
records[2].CardType=0
records[2].CitizenIDNo=123456789012345678
records[2].Doors[0]=0
records[2].DynamicCheckCode=
records[2].FirstEnter=false
records[2].Handicap=false
records[2].IsValid=false
records[2].Password=234
records[2].RecNo=4
records[2].RepeatEnterRouteTimeout=4294967295
records[2].TimeSections[0]=255
records[2].UseTime=200
records[2].UserID=8
records[2].UserType=0
records[2].VTOPosition=
records[2].ValidDateEnd=2037-01-02 01:00:00
records[2].ValidDateStart=2019-01-02 00:00:00
O dispositivo irá enviar os usuários agrupados de 5. A chamada precisa ser usada recursivamente até exibir todos os usuários. Quando não houver mais usuários será exibida a mensagem abaixo.
Exemplo de Retorno
{
"result": true,
"id": 1,
"params":
{
"found": 0
}
}
Exemplos
import requests
device_ip = '10.1.35.144'
username = 'admin'
password = 'intelbras'
url = "http://{}/cgi-bin/recordFinder.cgi?action=doSeekFind&name=AccessControlCard".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)
Obter Número Total de Usuários Cadastrados
Por meio da chamada abaixo é possível obter o numero total de usuários cadastrados.
Requisição - GET
http://192.168.1.201/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessUserInfo
param | type | description |
---|---|---|
AccessUserInfo * | String | Comando para obter numero de Usuários cadastradas |
AccessControlCard * | Number | Registros que serão buscados |
Exemplo de Retorno - text/plain
Size=1
count=1
Exemplos
import requests
device_ip = '10.1.35.144'
username = 'admin'
password = 'intelbras'
url = "http://{}/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessUserInfo".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)