Set DNS
Deprecated since September 2024.
1. API Description
This API is used to set DNS.
Request mode: POST [ip]/api/network/set-dns
Administrator Rights | Logged-in |
---|---|
Yes | Yes |
2. Input Parameters
Name | Required | Type | Description |
---|---|---|---|
is-manual | No | Boolean | Whether to configure DNS manually true: Yes; false: No |
dns1 | No | String | Primary DNS. Empty characters mean not set. |
dns2 | No | String | Secondary DNS. Empty characters mean not set. |
3. Output Parameters
Name | Type | Description |
---|---|---|
status | Int | Status code |
code | String | Status description |
4. Example
Set DNS.
Input Example
{
"is-manual": true,
"dns1": "10.0.1.3",
"dns2": ""
}
Output Example
{
"status": 0,
"code": "Success"
}
5. Error Code
No error code related to the API business logic. For other error codes, see Common Error Codes.