Manage Names of Multi-Outlet Device

Last Updated on : 2024-06-05 03:15:11download

API list

Action Description
device.multiple-name Get names of a multi-outlet device.

Get names of a multi-outlet device

API endpoint

action: device.multiple-name

Request parameter

Parameter name Parameter type Description Required
device_id String The device ID. Yes

Sample request

{
    "action": "device.multiple-name",
    "params": {
        "device_id": "vdevo158389535209173"
    }
}

Response parameter

Parameter name Type Description
code Integer The response code.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: success.
  • false: failure.
  • msg String The error message that is returned if the API call fails. This parameter value is empty if the API call succeeds.
    result Boolean Indicates whether the operation is successful.

    Description of result

    The name. Type Description
    identifier String The identifier.
    name String The name.

    Sample response

    {
        "result": [
            {
                "identifier": "switch_1",
                "name": "Power strip 1"
            },
            {
                "identifier": "switch_2",
                "name": "Power strip 2"
            },
            {
                "identifier": "switch_3",
                "name": "Power strip 3",
            },
            {
                "identifier": "main",
                "name": "3-outlet power strip"
            }
        ],
        "success": true,
        "t": 1583895729781
    }
    

    Error codes

    The following table lists common error codes for the API calls. For more error codes, see Global Error Codes.

    Error codes Description
    500 A system error has occurred while processing your request.