Set DNS
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 | Yes | Boolean | Whether to configure DNS manually true: Yes; false: No |
| dns1 | Yes | String | Primary DNS. Empty characters mean not set. |
| dns2 | Yes | String | Secondary DNS. Empty characters mean not set. |
3. Output Parameters
| Name | Type | Description |
|---|---|---|
| status | Int | Status code |
4. Example
Setting DNS.
Input Example
{
"is-manual": true,
"dns1": "10.0.1.3",
"dns2": ""
}
Output Example
{
"status": 0
}
5. Error Code
No error code related to the API business logic. For other error codes, see Common Error Codes.