![]() |
REST API
16
REST API for Luna Network HSMs
|
Sets all ip4 configurations for a specific device.
Users with the following role privileges can perform this command:
The identifier of a network device.
Use: Required
JSON Schema:
Object type: string pattern: ^(eth0|eth1|eth2|eth3|bond0|bond1)$
The ip address to set for the device.
Use: Required
JSON Schema:
Object
type: string
pattern: ^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
The subnet mask to set for the device.
Use: Required
JSON Schema:
Object type: integer MinValue: 1 MaxValue: 32
The default gateway to set for the device.
Use: Required
JSON Schema:
Object
type: string
pattern: ^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
Mode to be set for the bonded interface only. Default mode for bonded is active-backup. Note: Configiguring LACP bonding mode requires interfaces to be configured with the same speed.
Use: Optional
JSON Schema:
Object type: string Pattern: ^(active-backup|broadcast|lacp)$
Success
We failed to parse your request.
No session cookie was found.
This operation is forbidden.
Specified interface does not exist.
Unable to set interface with specified parameters.
PUT
https://1.2.3.4:8443/api/lunasa/network/devices/eth0/ip4
{
"ip" : "1.2.3.5",
"mask" : 24,
"gateway" : "1.2.3.7"
}
{
}
PUT
https://1.2.3.4:8443/api/lunasa/network/devices/bond0/ip4
{
"ip" : "1.2.3.5",
"mask" : 24,
"gateway" : "1.2.3.7"
}
{
}
PUT
https://1.2.3.4:8443/api/lunasa/network/devices/bond0/ip4
{
"ip" : "1.2.3.5",
"mask" : 24,
"gateway" : "1.2.3.7",
"mode": "broadcast"
}
{
}