Enable/Disable Wi-Fi/AP

1. API Description

This API is used to enable/disable Wi-Fi or AP.

Request mode: POST [ip]/api/network/if-enable

Administrator Rights Logged-in
Yes Yes

2. Input Parameters

Name Required Type Description
iface Yes String The network card name
wlan0: Wi-Fi; wlan1: AP
enable Yes Boolean Whether the network card service is enabled
true: Yes; false: No

3. Output Parameters

Name Type Description
status Int Status code

4. Example

Enabling the AP.

Input Example
{
  "iface": "wlan1",
  "enable": true
}
Output Example
{
    "status": 0
}

5. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Status Definition Description
7 MW_STATUS_INVALID_ARG Missing required parameters
12 MW_STATUS_DEVICE_LOST The operation target is not a wireless network card
31 MW_STATUS_NOT_PERMITTED No permission to operate this network card

results matching ""

    No results matching ""