Set the power module
1. API Description
This API is used to set the status of the power module
Request mode: POST [ip]/api/chassis/set-power
| Administrator Rights | Logged-in |
|---|---|
| Yes | Yes |
2. Input Parameters
| Name | Required | Type | Description |
|---|---|---|---|
| power-on | Yes | Boolean | Whether to power on true: Yes; false: No |
3. Output Parameters
| Name | Type | Description |
|---|---|---|
| status | Int | Status code |
| code | String | Status description |
4. Example
Powering on the power module.
Input Example
{
"power-on": true
}
Output Example
{
"status": 0,
"code": "Success"
}
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 |
|---|---|---|
| 1 | MW_STATUS_PENDING | Pending |
| 7 | MW_STATUS_INVALID_ARG | Missing required parameters |
| 12 | MW_STATUS_DEVICE_LOST | Communication failure between host and power board |