> 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/api-inc-cloud/primeiros-passos.md).

# Primeiros passos

Um fluxo completo: listar sites, dispositivos e clientes online.

Este guia mostra um fluxo típico de integração: descobrir os sites da conta, listar os dispositivos de um site e consultar os clientes conectados.

Antes de começar, tenha em mãos a sua `apikey` (veja [Autenticação](/api-inc-cloud/autenticacao.md)).

{% stepper %}
{% step %}

### Liste os sites da conta

```bash
curl "https://inccloud-api.intelbras.com.br/user/shop?locale=en" \
  -H "apikey: SUA_API_KEY"
```

Guarde o `shopId` do site que você quer consultar:

```json
{
  "code": 0,
  "data": [
    { "userName": "usuario.exemplo", "shopId": 286, "shopName": "Site Matriz" }
  ]
}
```

{% endstep %}

{% step %}

### Liste os dispositivos

```bash
curl -X POST "https://inccloud-api.intelbras.com.br/shop/device/page?user_name=usuario.exemplo&locale=en" \
  -H "apikey: SUA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "start": 1, "size": 20, "shopName": "Site Matriz" }'
```

Cada item traz o número de série (`devSn`), o modelo e o status do dispositivo.
{% endstep %}

{% step %}

### Consulte quantos clientes estão conectados

```bash
curl -X POST "https://inccloud-api.intelbras.com.br/stamonitor/getCurrentOnlineClientCount" \
  -H "apikey: SUA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user": "usuario.exemplo",
    "shops": ["286"],
    "startTime": 1757818800000,
    "endTime": 1757901031674
  }'
```

{% endstep %}
{% endstepper %}

## E depois?

* Use os endpoints de **Estatísticas** e **Relatórios** para montar dashboards de uso da rede.
* Use **Alarmes** para integrar os alertas da rede ao seu sistema de monitoramento.
* Use **Dispositivos → topologia** (`/common/topo/nodes` e `/common/topo/links`) para desenhar o mapa da rede.


---

# 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/api-inc-cloud/primeiros-passos.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.
