setEthernet.lua
[INDEX]

ABSTRACT

Modify the Ethernet connection

ARGUMENTS

HTTP Arguments submit: POST

Test this API over HTTP - (URL):

DeviceObject

Optional. if specified, then it is ObjectID of network interface (Refer to getNetInterface.lua); otherwise, it is the default Ethernet interface.

Test value:

Object
(MUST)

The Ethernet connection object name (Get it by getEthernetDetail.lua - [ConnectionObject])

Test value:

Uuid
(MUST)

The Ethernet connection UUID (Get it by getEthernetDetail.lua - [Uuid])

Test value:

CloneMac

Optional. If specified 'CloneMac' (and it's not empty), the MAC address of Ethernet can be modified.

Test value:

DHCP
INTEGER

1

IP addresses get by DHCP

0

Set IP addresses manually. If this set, the arguments in parameter group 'Manual-IP' need set.

Test value:

Parameters group: Manual-IP

Arguments group of manually setting IP addresses. This group contans: IP, Mask, Prefix, Gateway, Dns1, Dns2

Enable this group:

>   IP
[In parameter group: Manual-IP]

IP address

Test value:

>   Mask
[In parameter group: Manual-IP]

Subnet mask in IP token format.

Test value:

>   Prefix
[In parameter group: Manual-IP]

Subnet mask in prefix format (Note: Mask or Prefix, alternatively)

Test value:

>   Gateway
[In parameter group: Manual-IP]

Default gateway

Test value:

>   Dns1
[In parameter group: Manual-IP]

DNS1 (or empty)

Test value:

>   Dns2
[In parameter group: Manual-IP]

DNS2 (or empty)

Test value:

RETURNS

Return a JSON style result. The JSON format is:

{
/*OBJECT*/

"Result":
NUMBER

200 means OK, other error code meanings are similar to HTTP Response.

"Status":
"STRING"

Status message. Responsing result status of API executive, if there errors, it will describe reasons.

}

NOTES

After call this API, the changed network arguments will not be brought to effect until you reboot the device, or call the API connectEthernet.lua to reconnect the connection.

OTHER NOTES

KILOVIEW Device HTTP API, v1.0