> For the complete documentation index, see [llms.txt](https://portal-integracao.intelbras.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://portal-integracao.intelbras.com.br/linha-de-faciais/configuracao-de-credencial-controle-remoto/obter-controles-remotos-cadastrados.md).

# Obter Controles Remotos Cadastrados

Para procurar os controles remotos cadastrados, é possível obter todos os controles remotos ou filtrar pelo UserID.

### Obter Controles Remotos - 1º Request

Esta chamada está dividida em dois passos. Primeiramente, é iniciada a pesquisa dos controles remotos totais ou vinculados ao usuário, utilizando a chamada "Obter Controles Remotos - Step 1º", onde será repassado seu UserID.

{% hint style="info" %}
Apesar da semelhança com o comando de busca para os cartões cadastrados, para os controles remotos é necessário repassar as condições dentro do corpo da requisição (*body)*.
{% endhint %}

#### Requisição - GET

`http://192.168.1.201/cgi-bin/AccessWirelessCard.cgi?action=startFind`

| param          | type   | description                   |
| -------------- | ------ | ----------------------------- |
| `startFind` \* | String | Comando de inicio de pesquisa |

#### Body - *application/json*

```json
{
    "Condition": ""
}
```

| param         | type   | description                                                                                                |
| ------------- | ------ | ---------------------------------------------------------------------------------------------------------- |
| `Condition`\* | String | <p>Condição que será usada como filtro para realizar a busca.<br><br>Caso não seja preenchida, buscará</p> |

#### Exemplo de Retorno - *application/json*

```sh
{
   "Caps" : 2,
   "Token" : 5,
   "Total" : 2 // Total de cartões do usuário
}
```

#### Exemplos

{% tabs %}
{% tab title="Python" %}

```python
import requests
import json

## Lembre-se de adicionar as várias de usuário e senha, além do IP.
url = "http://10.100.78.39/cgi-bin/AccessWirelessCard.cgi?action=startFind"

payload = json.dumps({
  "Condition": ""
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

{% endtab %}

{% tab title="Untitled" %}

```
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("http://10.100.78.39/cgi-bin/AccessWirelessCard.cgi?action=startFind")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"Condition\": \"\"\r\n    \n}")
  .asString();

```

{% endtab %}
{% endtabs %}

### Obter Controles Remotos - 2º Request

Após realizar a chamada "Obter Controles Remotos - Step 1º", realize a finalização da busca repassando as informações do token.

{% hint style="info" %}
Apesar da semelhança com o comando de busca para os cartões cadastrados, para os controles remotos é necessário repassar as condições dentro do corpo da requisição (*body)*.
{% endhint %}

#### Requisição - GET

`http://192.168.1.201/cgi-bin/AccessWirelessCard.cgi?action=doFind`

| param       | type   | description                   |
| ----------- | ------ | ----------------------------- |
| `doFind` \* | String | Comando de finalizar pesquisa |

#### Body - *application/json*

```sh
{
   "Token": 5,
   "Offset": 0,
   "Count": 16 
}
```

| param       | type   | description                                                                                                      |
| ----------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| `Token` \*  | Number | Token repassado no retorno da pesquisa                                                                           |
| `Offset` \* | Number | Chave de estado, default 0. Usado para avançar nas páginas de consulta.                                          |
| `Count` \*  | Number | Número de registro por página que será retornado. Para a consulta dos cartões, utilizar no máximo 50 por página. |

#### Exemplo de Retorno - *text/plain*

```sh
{
    "Info": [
	{
            "AlarmOutChannels": [0, 0, 0, 0],
            "AlarmOutTime": [500, 500, 500, 500],
            "CardName": "",
            "CardNo": "AABBCCDD",
            "CardStatus": 0,
            "CardType": 0,
            "CreateTime": 0,
            "DoorForces": [0, 0, 0, 0],
            "DoorReaders": ["1;0;0;0", "1;0;0;0", "0;0;0;0", "0;0;0;0"],
            "Doors": [1, 1, 0, 0],
            "DoorsOrAlarm": [0, 0, 0, 0],
            "KeyNumber": 2,
            "UserID": "1"
        }, {
            "AlarmOutChannels": [0, 0, 0, 0],
            "AlarmOutTime": [500, 500, 500, 500],
            "CardName": "",
            "CardNo": "99558877",
            "CardStatus": 0,
            "CardType": 0,
            "CreateTime": 0,
            "DoorForces": [0, 0, 0, 0],
            "DoorReaders": ["1;0;0;0", "1;0;0;0", "0;0;0;0", "0;0;0;0"],
            "Doors": [1, 1, 0, 0],
            "DoorsOrAlarm": [0, 0, 0, 0],
            "KeyNumber": 2,
            "UserID": "2"
        }
    ]
}
```

#### Exemplos

{% tabs %}
{% tab title="Python" %}

```python
import requests
import json
## Lembre-se de adicionar as várias de usuário e senha, além do IP.

url = "http://10.100.78.39/cgi-bin/AccessWirelessCard.cgi?action=doFind"

payload = json.dumps({
  "Token": 5,
  "Offset": 0,
  "Count": 16
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
```

{% endtab %}

{% tab title="Java - Unirest" %}

```java
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://10.100.78.39/cgi-bin/AccessWirelessCard.cgi?action=doFind")
  .header("Content-Type", "application/json")
  .body("{\r\n\r\n    \"Token\": 1,\r\n\r\n    \"Offset\": 0,\r\n\r\n    \"Count\": 50\r\n\r\n}")
  .asString();

```

{% endtab %}
{% endtabs %}

### Parar a consulta

Como boa prática, após finalizar a consulta, recomendamos que seja finalizado o token, através do comando abaixo:

#### Requisição - GET

`http://192.168.1.201/cgi-bin/AccessWirelessCard.cgi?action=stopFind`

| param         | type   | description                   |
| ------------- | ------ | ----------------------------- |
| `stopFind` \* | String | Comando de inicio de pesquisa |

#### Body - *application/json*

```json
{
    "Token": 5
}
```

| param     | type   | description                                    |
| --------- | ------ | ---------------------------------------------- |
| `Token`\* | Number | Valor do token usado para realizar a consulta. |

#### Exemplo de Retorno - *text/plain*

```sh
{}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://portal-integracao.intelbras.com.br/linha-de-faciais/configuracao-de-credencial-controle-remoto/obter-controles-remotos-cadastrados.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
