ACS API New in 7.2
Complete reference of the ACS environment API (subscriber router management over TR-069): query the inventory, the complete portrait of each CPE and the fleet's health, and manage Wi-Fi, WAN/PPPoE, LAN, port forwards, provisioning profiles, bulk campaigns, routines, diagnostics and homologation through external integration. There are 69 operations covering everything the interface does.
Overview
The ACS API exposes the entire ACS environment to external systems. It covers two big use cases:
- Query: list of CPEs with filters and pagination (with CSV/PDF export), complete portrait of a CPE (Wi-Fi, WAN, LAN, ports, connected hosts, links with OLT and concentrator, tasks, alerts and audit), fleet overview, state of the management environment, profiles, homologated models, routines, campaigns, diagnostics and AI summaries.
- Manage: restart and factory reset, edit Wi-Fi (network, password, channel), WAN (DNS, MTU, IPv6, VLAN), PPPoE credentials, LAN/DHCP, physical ports, port forwards and DMZ, block devices, CPE web management, link ONU, create and apply provisioning profiles, launch bulk campaigns (including firmware), configure autonomous routines, run diagnostics and conduct model homologation.
Typical cases: integrating CPE provisioning into your ERP's activation flow, changing the subscriber's Wi-Fi password straight from your support system, feeding your own dashboard with the fleet's health and automating firmware campaigns outside business hours.
Prerequisites
| Requirement | Detail |
|---|---|
| Plan with ACS Limit per plan | The ACS environment must be enabled on the subscription. Without it, every operation responds Modulo ACS nao liberado no plano deste servidor. |
| API key with the ACS permission | When creating or editing the key in Settings, Integrations tab, API Management card, check ACS access in the Access Permissions section. See Creating an API key. |
| ACS environment active | Management environment on (gear of the ACS environment) and CPEs pointed at the server. Write operations on a CPE require it to be communicating. |
| Network | HTTPS access to the customer's Ravi server. |
A key with ACS access has read and write over everything in the module: it can factory reset any CPE, change PPPoE credentials and launch campaigns across the entire fleet. Treat it as a high-privilege credential: create a dedicated key per integration, fill in the Description (optional) field and do not check other unnecessary permissions.
Every write operation made through the API enters the system's action history identifying the key used (number and description). The tasks created appear on the module screens with origin api. Test bench mode, when on in the module settings, also applies to the API: writes only on the CPEs of the test list.
Call format
All operations use the single endpoint of the public API, with action=cpe. GET and POST are accepted on every operation; prefer POST on write operations and whenever you want to keep the token out of access logs. Each operation's parameters go along, in the querystring or in the form body.
https://YOUR-RAVI/api/api.php?token=KEY&action=cpe&operation=OPERATION_NAME
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | yes | 32-character API key with the ACS access permission. |
action | string | yes | Always cpe for this module. |
operation | string | yes | The desired operation (reference in the sections below). |
Response envelope:
- Success:
{"status":"success","data":{...}}with HTTP 200. - Error:
{"status":"error","message":"..."}. On the two-step confirmations (below) and in some validations, the error comes along with adatafield with details. - Exception:
operation=cpeswithexport=csvorexport=pdfreturns the raw file (CSV or PDF), outside the JSON envelope. - Complete body examples for each response, operation by operation, in the Response examples section.
Operations that create a task on the CPE
Actions that touch the equipment (restart, edit Wi-Fi, WAN etc.) are not instantaneous: they create a task that the system sends to the CPE and then re-reads to confirm the value really changed. The response brings the initial state:
| Field | Meaning |
|---|---|
status | ok (the CPE answered right away), enviada (waiting for the CPE to communicate), fila (waiting to be sent), agendada (future schedule) or falha. |
http | Return code of the send. |
erro | Message when something failed; empty on success. |
tarefa | Identifier of the task that was created. It is the same id shown by operation=tarefas. |
rastro | Operation code stored with the task. Use it to locate the action in the history. |
Follow the outcome (confirmed or not) with operation=tarefas, which shows the final status of each task after the re-read. Keep the tarefa value to find yours in the list: the action response only says the task was accepted, and only the final status tells whether the device ended up as requested.
Two-step confirmation
Three wide-reaching flows require explicit confirmation. The first call responds status:"error" with the reach numbers in data; repeat the call with the confirmation field to execute:
| Flow | Confirmation field | What comes in data on the 1st call |
|---|---|---|
perfil_salvar / perfil_ativo (active profile that reaches CPEs) | confirmado=1 | confirmar:true, alcance (CPEs reached), escopoRotulo, bancada. |
massa_criar | confirmado=1 | confirmar:true, alcance, bancadaFora, rotuloAcao. |
config_salvar when turning off test bench mode | confirmarBancadaOff=1 | precisaConfirmar:"bancada_off", active perfis, alcance. |
Errors common to all operations
message | Cause |
|---|---|
Invalid token | Nonexistent, wrong or revoked key (HTTP 401). |
Access denied for cpe | Key without the ACS access permission (HTTP 403). |
Operation not provided / Invalid operation | operation was missing, or the name does not exist. |
Modulo ACS nao liberado no plano deste servidor. | The subscription does not include the ACS environment. |
cpe nao encontrada | The given serial does not exist in the inventory. |
Modo bancada ativo: escrita bloqueada para CPEs fora da lista de teste... | Test bench mode is on and the serial is outside the list. Adjust the list in the module settings. |
Este recurso ainda não tem caminho homologado para este modelo... | The CPE's model does not have that feature homologated yet. Complete the model's homologation in the interface. |
Query operations
cpes: list the inventory
Paginated list with the same filters as the CPEs screen. All parameters are optional:
| Parameter | Description |
|---|---|
busca | Free text: searches serial, PPPoE login, MAC, IPv4/IPv6 and description. |
fabricante, modelo, firmware, etiqueta | Exact filters (model also matches the product class). |
status | 1 online only, 0 offline only. |
favoritas | 1 favorites only. |
pagina, porPagina | Pagination; porPagina accepts 25, 50 or 100 (default 25). |
ordem, dir | Sorting: serial, fabricante, modelo, firmware, login, ipWan4, ultimaComunicacao (default), dataChegada, statusOnline; dir = asc or desc. |
export | csv or pdf: returns the file with the same filters (up to 5000 rows, no pagination), outside the JSON envelope. |
Response: total, pagina, porPagina, itens[] (serial, manufacturer, model, firmware, PPPoE login, MAC, IPs, status, last contact, description, labels, favorite, links) and contagens (online, offline, favorites, silent for 24 h). With an ERP connected, each item gains erpNome and erpStatus.
cpe: complete portrait of a CPE
Parameters: serial (required) and hosts (optional: all includes devices that have left). Returns everything the CPE page shows: record and subscriber, equipment information, optical signal, WANs (PPPoE and IP), LAN, Wi-Fi networks, port forwards and DMZ, web management, connected devices (with blocking), historical series, topology links (session, concentrator, ONU/OLT), recent tasks, audit and available firmwares.
State of the environment and the fleet
| Operation | Parameters | What it returns |
|---|---|---|
visao_geral | none | The Overview screen data: fleet traffic by hour (24 h), devices connected right now (cable × Wi-Fi), routine automation over 30 days and the map of reboots and outages by day/hour. |
acs_status | none | State of the management environment: ativo, semLeitura, timestamp of the last read. |
ia_resumo | escopo = frota (default) or cpe + serial | The last stored AI summary and whether the portrait changed since it (gerarAuto). |
Listings
| Operation | Parameters | What it returns |
|---|---|---|
perfis | none | All provisioning profiles, with each one's configuration. |
modelos | none | The model catalog (manufacturer, model, firmware, homologation date). |
rotinas | none | The autonomous routines with parameters, coverage and next runs. |
tarefas | serial (optional), limite (default 100, max 500) | The task queue: type, origin, status (up to the confirmation by re-read), return and rejected values. |
alertas | serial and ativo (1/0) optional, limite | Module alerts (offline, signal, temperature etc.) with opening, resolution and notification. |
diagnosticos | serial (required) | The CPE's diagnostics (last 20) with per-type support, configured connectivity categories and results. |
homolog_andamento | id or idModelo | Progress of the guided homologation: stage, items with status and the final result. |
Actions on a CPE
All require serial (the exact serial from the inventory). The ones that write to the equipment create a task with a confirmation re-read and honor test bench mode.
Power, data and record
| Operation | Parameters besides serial | What it does |
|---|---|---|
atualizar | none | Forces a complete re-read of the CPE's data. |
reiniciar | none | Restarts the CPE. |
resetar | none | Restores the CPE to factory defaults. Irreversible: the CPE comes back without the subscriber's settings. |
remover | none | Removes the CPE from the inventory and the management server. If it stays pointed at the server, it comes back once it communicates. |
editar | descricao, etiquetas (comma-separated), velocidadePlano | Edits the local record (does not touch the equipment). |
favorito | valor = 1 marks, 0 unmarks | Marks/unmarks the CPE as favorite. |
wifi_editar: Wi-Fi network
| Parameter | Required | Rule |
|---|---|---|
caminho | yes | The Wi-Fi network's path, as it comes in the CPE portrait (operation=cpe, wifi block). |
ssid | yes | Network name, 1 to 32 characters. |
senha | no | Empty keeps the current one; when filled, 8 to 63 characters. |
canal | no | 0 = automatic; greater than zero pins the channel. |
ativo, broadcast | no | 1 (default) turns the radio on / announces the SSID; 0 turns off/hides. |
wan_editar, wan_pppoe_editar and wan_vlan_editar: internet interface
All of them receive caminho (the WAN connection, as it comes in the CPE portrait, wansPpp block).
| Operation | Parameters | Rule |
|---|---|---|
wan_editar | dns (IPv4, comma), dns6 (IPv6, comma), mtu (576 to 1500; 0 = do not change), ipv6 (1/0) | Empty fields are not changed. Whatever the model does not expose is left out and the response points it out in the ignorado field. IPv6 DNS is only sent with IPv6 on. |
wan_pppoe_editar | usuario, senha | Changes the PPPoE credentials. At least one of the two; empty keeps the current one. |
wan_vlan_editar | vlan (1 to 4094) | Applies the WAN connection VLAN. The model must expose the WAN VLAN; when it does not, the operation refuses with a clear message. The provider may turn this operation off in the ACS settings (switch "Integrations through the API may change the WAN VLAN"): it then answers an error and nothing is sent to the CPE. The answer carries status "error" and data.codigo = "vlan_api_desligada", so the integration can tell this refusal from the others. |
Changing a PPPoE credential, turning IPv6 off or changing the VLAN can drop the subscriber's connection on the spot. A VLAN that does not match the network provisioning (OLT and BNG) leaves the CPE offline until it is fixed. The confirmation re-read happens when the CPE communicates again.
LAN, ports and web management
| Operation | Parameters besides serial | Rule |
|---|---|---|
lan_editar | dhcp (1/0), gateway, mascara, min, max (IPv4), dnsLan (IPv4, comma), lease (seconds) | Edits the LAN/DHCP. Empty fields are not changed. |
porta_editar | porta = port number or todas; ligar = 1 re-enables, 0 disables | Disables/re-enables physical LAN ports. The valid ports come in the CPE portrait. |
webuser_editar | fonte and instancia (from the snapshot, webUsuarios block), usuario (1 to 64; ignored when the account has no username, temUsuario field), senha (up to 64, empty keeps the current one) | Changes the CPE web interface access account (technician or subscriber), including the vendor's own nodes (Huawei, UNEE, Maxfiber and others). Without fonte, the standard node applies. Each webUsuarios item carries fonte, papel (tecnico/assinante) and temUsuario. |
webmgmt_editar | httpLan (1/0; only send it if the model exposes it), httpWan (1/0), porta (1 to 65535) | Turns web access over the LAN and the WAN on/off and sets the port. |
Port forwards, DMZ and device blocking
| Operation | Parameters besides serial | Rule |
|---|---|---|
portmap_criar | caminho (WAN connection), descricao, ip (internal IPv4), proto = TCP (default), UDP or TCPUDP, portaExt, portaInt (empty = same as external) | Creates the forward; TCPUDP creates one rule per protocol. |
portmap_editar | caminho (of the rule, from the portrait), ativo (1/0) | Turns an existing rule on/off. |
portmap_remover | caminho (of the rule) | Removes the rule. |
dmz_editar | ativo (1/0), host (IPv4, required when enabling), caminho (WAN connection) | Enables/disables the DMZ. |
host_bloquear / host_desbloquear | mac (format AA:BB:CC:DD:EE:FF) | Blocks/unblocks a device on the CPE's Wi-Fi (on models that expose the feature, after homologation). |
Link with the ONU
| Operation | Parameters besides serial | What it does |
|---|---|---|
onu_buscar | idOlt, busca (optional) | Searches for the matching ONU in the OLT collection (up to 60 results; ONUs already linked to another CPE come marked). |
onu_vincular | idOlt, serialOnt | Manually links the CPE to that ONU (local record only, nothing is written to the OLT). |
onu_desvincular | none | Undoes the manual link. |
Profiles, homologation and routines
Provisioning profiles
| Operation | Parameters | What it does |
|---|---|---|
perfil_salvar | id (0 = create), nome, escopo (global, modelo, plano, pop or cpe), alvo (required outside global), prioridade (0 to 999), ativo, recursos[...], portmaps[...], avancado, confirmado | Creates or edits a profile. recursos is a field → value map (e.g.: recursos[wifi24_ssid], recursos[wan_dns4], recursos[lan_dhcp]); an empty value means "do not provision". An active profile that reaches CPEs requires two-step confirmation. |
perfil_ativo | id, valor (1/0), confirmado | Turns a profile on/off (turning on also requires confirmation when it reaches CPEs). |
perfil_duplicar | id | Duplicates the profile; the copy is born off. |
perfil_excluir | id | Deletes the profile and unlinks the CPEs. |
perfil_simular | serial | Simulates: shows the chain of profiles that applies to that CPE and the resulting final state. |
perfil_seriais | none | Recent serials to use in the simulation. |
Model catalog and guided homologation
| Operation | Parameters | What it does |
|---|---|---|
modelo_ler | id | Reads a model from the catalog with the support matrix and the homologated paths. |
modelo_salvar | id, fabricante, modelo, versaoFirmware, dataModel (TR098/TR181), quirks, homologado, suporta[...], caminhos[...] | Creates/edits a model in the homologation catalog. |
modelo_excluir | id | Deletes the model from the catalog. |
modelo_cpes | id | CPEs of that model, sorted by the best candidates for homologation. |
homolog_sondar | serial | Tests whether the CPE responds right away (direct reach) before starting. |
homolog_iniciar | idModelo, serial, bancada (optional) | Starts the guided homologation on that CPE; follow it with homolog_andamento. |
homolog_cancelar | id | Cancels the homologation (restoring the equipment if the battery had already started). |
Autonomous routines
Routines exist one per type; use operation=rotinas to list the ids. Then:
| Operation | Parameters | What it does |
|---|---|---|
rotina_salvar | id, ativa (1/0), limite (1 to 1000), intervaloHoras (1 to 168), janelaInicio/janelaFim (HH:MM) + extras per type | Turns the routine on/off and stores its parameters. |
rotina_executar | the same ones | Stores the parameters and runs a round now. |
Extras per type: dns4 (standard DNS routine), ntp (time servers), idPerfilRestrito (profile for the ERP block), wifiNotaLimiar and largura20 (Wi-Fi channel fix), uptimeMinDias (therapeutic reboot), etiqueta (pickup of canceled subscribers).
Both operations store the routine's complete configuration on every call: a missing parameter goes back to the default and a missing ativa turns off the routine. Read the routine with operation=rotinas and resend every field with the desired values.
Bulk actions (campaigns)
The flow is the same as the Bulk screen: filter the targets, check the reach and confirm.
| Operation | Parameters | What it does |
|---|---|---|
massa_contar | filters: fabricante, modelo, plano, pop, status (online/offline), etiqueta | Counts the targets of the filters (and how many pass test bench mode). |
massa_criar | filters + tipoAcao = reiniciar, atualizar, dns, wifi or firmware; extras per type; nome; agendadoPara (future date), janelaInicio/janelaFim, repetir (diaria/semanal/mensal) + repetirHora/repetirDiaSemana/repetirDia; confirmado=1 | Creates the batch and expands it into one task per CPE. Extras: dns (comma-separated IPv4) on the dns type; canal24, canal5, senha24, senha5 on the wifi type; idFirmware (and the required modelo filter) on the firmware type. Without confirmado, it returns the preview with the reach. |
massa_lote_status | id, valor = executando, pausado or cancelado | Pauses, resumes or cancels a batch (canceling also cancels the tasks not yet sent). |
massa_lotes | none | Lists the latest batches with totals and status. |
massa_relatorio | id | CPE-by-CPE report of the batch (status and return of each task). |
massa_firmwares | modelo, fabricante (optional) | Repository firmwares for that model. |
massa_firmware_enviar | fabricante, modelo, versao + file in the arquivo field | Uploads a firmware to the repository. The only operation that requires multipart/form-data. |
Environment configuration
| Operation | Parameters | What it does |
|---|---|---|
config_salvar | only the keys sent are stored | Stores the module configuration: management address and credentials, communication interval, retention and quotas, auto removal of offline CPEs, test bench mode and serial list, health thresholds, alerts (types, offline window), diagnostic URLs and targets. The field names are the ones from the Settings screen. The switch "Integrations through the API may change the WAN VLAN" (api_vlan_editar) only changes from the screen: sent through the API it is ignored, and the answer carries data.ignorados with its name. |
config_ambiente | desejado = ativo or inativo | Turns the management environment on/off (applied within moments by the system). |
config_preflight | none | Pre-install check of the environment (space, dependencies). |
config_alerta_flags | ativaTELEGRAMcpe, ativaWHATScpe (1 = inherit defaults, 2 = customize, 3 = disabled), prioridadewhatscpe | The module's alert channels. |
config_telegram_salvar / config_telegram_excluir / config_telegram_testar | id, chat_id, token, inicio, fim, prioridade, descricao | The module's own Telegram destinations (customize mode). |
adocao_gerar | marca = huawei, zte, nokia, datacom or dasan; url, perfil, vlan, intervalo, senha (1 reveals the management password in the script) | Generates the adoption scripts (global and per ONT) filled in with the environment data. Read-only: nothing is executed on the OLT. |
erp_atualizar | serial | Re-queries this CPE's subscriber in the connected ERP and updates the mirror (at most 1 query per minute per login). |
diag_disparar | serial, tipo = ping, traceroute, download, upload, sitesurvey or conectividade + extras (host, repeticoes, timeoutMs, maxSaltos, categorias, velocidade) | Launches a diagnostic on the CPE; follow it with operation=diagnosticos. One at a time per CPE. |
diag_cancelar | serial, id | Cancels the diagnostic in progress. |
ia_gerar / ia_voto | escopo/serial; id and voto (1/0) | Generates an AI summary (reusing it when nothing changed) and records the usefulness rating. |
adocao_gerar with senha=1 returns the management password in clear text inside the script. Only use it on secure channels and avoid storing the response in logs.
Response examples
This section shows the JSON body returned by the main operations, so you can write your parser without guessing field names. Values are fictitious; the structure is the real one. Two rules apply everywhere:
- Fields the device does not expose (or that have not been read yet) come as
null. Treat every field as optional in your parser. - Long lists are shown here with a single item, for space; the real response brings them all.
Write operation (e.g. wifi_editar, reiniciar)
Every action that touches the device responds with the initial state of the created task:
{
"status": "success",
"data": { "status": "ok", "http": 200, "erro": "", "tarefa": 5123, "rastro": "B2EF3369B929" }
}data.status follows the table in the Call format section (ok, enviada, fila, agendada or falha). In wan_editar, when the model does not expose one of the requested fields, the response gains "ignorado": "dns6, mtu" listing what was left out. In wifi_editar, when the device lacks one of the requested options (for example, hiding the network), the response gains "naoAplicavel": [ ... ] with what was not sent; everything else is applied normally.
cpes: inventory
{
"status": "success",
"data": {
"total": 412,
"pagina": 1,
"porPagina": 25,
"itens": [
{
"id": 3061,
"serial": "ZTEG12345678",
"fabricante": "ZTE",
"modelo": "F670L",
"productClass": "F670L",
"versaoFirmware": "V9.0.11P1N15",
"loginPPPoE": "cliente.joao",
"mac": "A0:B1:C2:D4:E5:F6",
"ipWan4": "198.51.100.23",
"ipWan6": "2001:db8:100::23",
"vlan": null,
"dataModel": "TR098",
"ultimaComunicacao": "2026-08-31 14:13:32",
"dataChegada": "2026-08-24 18:58:24",
"descricao": "Apartment 302",
"etiquetas": "fiber,downtown",
"favorito": 0,
"statusOnline": 1,
"idOltOnu": 154,
"idConcentradora": 2,
"credencialRecusada": 0,
"erpNome": "JOAO DA SILVA",
"erpStatus": "ativo"
}
],
"contagens": { "online": 398, "offline": 14, "favoritas": 6, "mudas24h": 3 }
}
}total is the filter total (the list carries only the requested page). erpNome and erpStatus only exist with an ERP connected. Dates always use the YYYY-MM-DD HH:MM:SS format, in the server's timezone.
cpe: full picture
The response gathers every block of the CPE page. Overall view (each block detailed next):
{
"status": "success",
"data": {
"acsOnline": true,
"assinante": { ... }, // ERP mirror (if connected)
"cpe": { ... }, // local record
"info": { ... }, // device
"papel": "onu", // "onu" or "roteador"
"pon": { ... }, // optical signal
"ponEsperado": "sim",
"portas": [ ... ], // physical LAN ports
"wansPpp": [ ... ], // PPPoE connections
"wansIp": [ ... ], // IP connections
"lan": { ... }, // LAN/DHCP (null if not read)
"wifi": [ ... ], // Wi-Fi networks
"portmaps": [ ... ], // port forwards
"dmz": { ... },
"webmgmt": { ... }, // CPE web management
"webUsuarios": [ ... ],
"bloqueio": { "suporta": true, "escrita": true, "macs": [ ... ] },
"hosts": [ ... ], // devices connected now
"hostsDesconectados": 9, // how many were left out (without hosts=all)
"series": { ... }, // historical series
"camadas": { ... }, // topology: session, BNG, OLT, CPE
"olts": [ ... ], // OLTs available for linking
"tarefas": [ ... ], // recent tasks (same format as operation=tarefas)
"backups": [ ... ],
"faults": [ ... ], // recent device refusals
"auditoria": [ ... ], // { "descricao", "data", "usuario" }
"firmwares": [ ... ], // repository firmwares for the model
"doc": { ... } // raw TR-069 tree of the device
}
}The blocks most integrations consume:
"cpe": {
"id": 3061, "serial": "ZTEG12345678", "descricao": "Apartment 302",
"etiquetas": "fiber,downtown", "favorito": 0, "statusOnline": 1, "reiniciaPorRpc": 1,
"loginPPPoE": "cliente.joao", "velocidadePlano": "500 Mbps / 250 Mbps",
"velocidadePlanoLocal": null, "ipWan4": "198.51.100.23", "ipWan6": "2001:db8:100::23",
"vlan": null, "mac": "A0:B1:C2:D4:E5:F6", "ultimaFalhaAuth": null, "credencialRecusada": 0
},
"info": {
"fabricante": "ZTE", "modelo": "F670L", "descricaoEquip": null, "serial": "ZTEG12345678",
"firmware": "V9.0.11P1N15", "hardware": "V9.0", "dataModel": "TR098",
"uptime": 86450, "cpu": 17, "memTotal": 262144, "memLivre": 131072,
"ultimaComunicacao": "2026-08-31 14:10:38", "ultimoBoot": "2026-08-30 14:09:48",
"dataChegada": "2026-08-24 18:58:23", "informIntervalo": 300, "perfil": null
},
"pon": { "rx": -18.5, "tx": 2.5, "temperatura": 46.0, "voltagem": 3.28, "corrente": 12.1 },
"wifi": [
{
"instancia": 1, "banda": "2.4",
"caminho": "InternetGatewayDevice.LANDevice.1.WLANConfiguration.1",
"ativo": true, "status": "Up", "ssid": "CasaDoJoao", "senha": "senha12345678",
"canal": 6, "autoCanal": true, "largura40": null, "padrao": "b,g,n",
"broadcast": true, "seguranca": "WPA2-Personal", "senhaLida": 1, "clientes": 3,
"potencia": 100, "potenciaSuportada": null,
"associados": [
{ "mac": "DC:F5:05:11:22:33", "ip": "192.168.1.100", "rssi": -52, "nome": null,
"snr": null, "taxaTx": null, "taxaRx": null, "largura": null,
"bytesRx": null, "bytesTx": null, "tempoSeg": null }
]
}
],
"wansPpp": [
{
"caminho": "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1",
"nome": "pppoe_1", "ativo": true, "status": "Connected", "usuario": "cliente.joao",
"ip4": "198.51.100.23", "ipRemoto": null, "dns": "203.0.113.53,203.0.113.54",
"dns6": null, "mac": null, "mtu": 1492, "nat": null, "uptime": 86420,
"ultimoErro": null, "vlan": null, "ipv6Ativo": true,
"ip6": "2001:db8:100::23", "prefixo6": "2001:db8:200::/56"
}
],
"portas": [
{ "n": 1, "status": "Up", "ativa": 1, "velocidade": "1000", "duplex": "Full",
"bytesRx": null, "bytesTx": null, "lidoEmTs": null, "nome": "LAN1",
"comentario": "", "wan": 0 }
],
"hosts": [
{ "mac": "DC:F5:05:11:22:33", "ip": "192.168.1.100", "hostname": "notebook-joao",
"interface": "WLAN", "ifaceDetalhe": "SSID1", "banda": "2.4", "rssi": -52,
"pontuacao": 95, "fabricanteMac": null, "conectado": 1, "visto": "2026-08-31 14:10:01" }
]Points of attention:
hostsbrings only the devices connected now (conectado: 1), andhostsDesconectadossays how many were left out. The CPE also keeps the devices that have been on it before; to receive that full list, withconectado(1 or 0) andvisto(last time the device was seen), sendhosts=all(orhosts=todos). With the CPE offline (cpe.statusOnline), the list reflects the last reading.- The
caminhofields (inwifi,wansPpp,wansIp,portmapsandwebUsuarios) are the keys the write operations ask for. They follow the device's data model (TR-098 or TR-181, fieldinfo.dataModel): treat them as opaque text and send them back exactly as received. seriesbrings chart-ready historical series:pon24h({"t","rx","tx"}),uso14d({"d","down","up"}, in bytes),usoHoje,hosts7d,wifi7dandfonteHist.camadassummarizes the topology in four blocks (sessao,bras,olt,cpe), each with anestadofield (ok,alerta,problemaorsemvinculo) and the details of that layer (signal at the OLT, session at the BNG etc.).docis the device's raw TR-069 tree, in its own data model. Contents vary by vendor and firmware; always prefer the structured blocks above.
tarefas: queue and outcome
{
"status": "success",
"data": {
"total": 1,
"itens": [
{
"id": "5123",
"serial": "ZTEG12345678",
"tipo": "setParameterValues",
"payload": { "name": "setParameterValues", "parameterValues": [ ... ] },
"origem": "api",
"status": "confirmada",
"tentativas": "1",
"retorno": "http 200",
"agendadoPara": null,
"recusados": null,
"idLote": null,
"criadoEm": "2026-08-31 14:14:28",
"alteradoEm": "2026-08-31 14:15:02"
}
]
}
}status walks the cycle fila, enviada, agendada, ok and closes as confirmada, parcial, nao_confirmada or falha after the re-read. When the firmware refuses part of the values, recusados lists what did not stick.
Campaigns: preview, creation and report
massa_criar without confirmado=1 returns the preview (note: status comes as error on purpose, with the numbers in data):
{
"status": "error",
"message": "Operation failed",
"data": { "confirmar": true, "alcance": 57, "bancadaFora": 0, "rotuloAcao": "Reiniciar" }
}{
"status": "success",
"data": { "id": 12, "criadas": 57, "semCaminho": 0, "semSuporte": 0 }
}massa_relatorio&id=12 follows CPE by CPE:
{
"status": "success",
"data": {
"linhas": [
{ "id": "5124", "status": "fila", "retorno": null, "alteradoEm": "2026-08-31 14:15:15",
"serial": "ZTEG12345678", "loginPPPoE": "cliente.joao",
"fabricante": "ZTE", "modelo": "F670L" }
]
}
}Listings
One item of each, in the real format:
{ "id": "3", "nome": "House default", "escopo": "global", "alvo": null, "prioridade": "10",
"config": { "recursos": { "wifi24_ssid": "RaviFibra-#LOGIN#" }, "portmaps": [], "declaracoes": [] },
"ativo": "1", "criadoEm": "2026-08-01 10:00:00", "alteradoEm": "2026-08-31 14:15:15" }{ "id": "7", "fabricante": "ZTE", "modelo": "F670L", "versaoFirmware": "V9.0.11P1N15",
"firmwareHomologado": null, "firmwareAlcance": null, "hardwareHomologado": null,
"hardwareAlcance": "", "dataModel": "TR098", "homologadoEm": "2026-08-08 16:47:49",
"homologadoPor": "guided homologation", "criadoEm": "2026-08-08 15:53:45",
"alteradoEm": "2026-08-30 18:35:02" }{ "id": "2", "tipo": "dns_padrao", "filtro": null,
"parametros": { "limite": 50, "intervaloHoras": 6, "janelaInicio": "01:00",
"janelaFim": "05:00", "dns4": "203.0.113.53" },
"ativa": "1", "ultimaExecucao": "2026-08-31 02:00:11", "proximaExecucao": "2026-08-31 08:00:00",
"cobertura": { "quando": "2026-08-31 02:00:11", "criadas": 4, "semCaminho": 0,
"elegiveis": 4, "total": 412 } }{ "id": "88", "serial": "ZTEG12345678", "tipo": "offline", "detalhe": "no communication for 45 min",
"ativo": "1", "abertoEm": "2026-08-31 13:30:00", "resolvidoEm": null,
"notificadoEm": "2026-08-31 13:30:05" }modelo_ler returns the same item as modelos together with caminhos (a resource → homologated data model path map) and the suporta matrix.
Environment state
{
"status": "success",
"data": { "ativo": true, "semLeitura": false, "em": "2026-08-31 14:14:14", "idadeSeg": 0 }
}visao_geral returns, inside data.dados: trafego (24 hourly positions in horas, down and up), aparelhos (totals per connection medium and a 24 h series), automacao (routine executions over 30 days) and sofrimento (the restart and drop map: a 7 day × 24 hour grade). diagnosticos returns suporte (what the model can run), the configured connectivity categorias and the diagnosticos list with the latest results.
The names and structure above are stable: new fields may be added in future versions, but existing ones do not change name or type. Write your parser tolerant to unknown fields.
Practical examples
List the offline CPEs (POST, with the token out of the URL):
curl -s https://YOUR-RAVI/api/api.php \ -d "token=YOUR_KEY" \ -d "action=cpe" \ -d "operation=cpes" \ -d "status=0" \ -d "porPagina=100"
Change a subscriber's Wi-Fi password (the caminho comes from the CPE portrait, wifi block):
curl -s https://YOUR-RAVI/api/api.php \ -d "token=YOUR_KEY" \ -d "action=cpe" \ -d "operation=wifi_editar" \ -d "serial=ZTEG12345678" \ -d "caminho=InternetGatewayDevice.LANDevice.1.WLANConfiguration.1" \ -d "ssid=JohnsHome" \ -d "senha=NewPassword2026"
Restart and then follow the task's outcome:
curl -s https://YOUR-RAVI/api/api.php \ -d "token=YOUR_KEY" -d "action=cpe" -d "operation=reiniciar" -d "serial=ZTEG12345678" curl -s "https://YOUR-RAVI/api/api.php?token=YOUR_KEY&action=cpe&operation=tarefas&serial=ZTEG12345678&limite=5"
Restart campaign outside business hours, in two steps (preview and confirmation):
# 1st call: returns status "error" with data.confirmar=true and the reach curl -s https://YOUR-RAVI/api/api.php \ -d "token=YOUR_KEY" -d "action=cpe" -d "operation=massa_criar" \ -d "tipoAcao=reiniciar" -d "fabricante=ZTE" \ -d "janelaInicio=02:00" -d "janelaFim=05:00" # 2nd call: the same fields + confirmado=1 curl -s https://YOUR-RAVI/api/api.php \ -d "token=YOUR_KEY" -d "action=cpe" -d "operation=massa_criar" \ -d "tipoAcao=reiniciar" -d "fabricante=ZTE" \ -d "janelaInicio=02:00" -d "janelaFim=05:00" -d "confirmado=1"
Troubleshooting
| Symptom | Cause and solution |
|---|---|
Access denied for cpe | The key does not have the ACS access permission. Edit the key in Settings, Integrations tab, and check the permission. |
Modulo ACS nao liberado no plano deste servidor. | The subscription does not include the ACS environment. Talk to sales or activate it through the ACS menu item. |
| A write responds with a test bench mode error | Test bench mode is on in the module settings and the serial is outside the test list. Add the serial to the list or turn off test bench mode (with the confirmation). |
| Non-homologated path error | That feature has not been homologated for the CPE's model yet. Complete the homologation (Homologation screen) and try again. |
Task stays at enviada | Normal on a CPE behind CGNAT: the write is applied when the CPE communicates on its next communication interval. Follow it in operation=tarefas. |
Task ends at nao_confirmada | The CPE accepted the send but the re-read did not confirm the value (the firmware ignored the write). The task's recusados field shows what did not stick. |
rotina_salvar turned the routine off by accident | The routine operations store the complete configuration: send ativa=1 and every parameter on each call. |