Interface operations
RESTful API for IBM® Spectrum Control Base Edition uses the GET, PATCH, POST and DELETE commands for interface operations.
You can run an interface query by issuing the GET command to get a list of IP interfaces that belong to a storage system and their properties, or display the properties of a single interface. The command output can be filtered by module ID or interface type (management, iSCSI, etc.).
OK 200
{
"name": "management",
"array": "pu16",
"module": "1:Module:1",
"type": "Management",
"address": "9.151.156.3",
"netmask": "255.255.248.0",
"gateway": "9.151.159.254",
"address6": "",
"gateway6": "",
"mtu": "1500",
"ports": "",
"id": 11
}
You can initiate a partial update action on an interface by issuing the PATCH command with the following syntax: PATCH /api/v1/interfaces/<interface-id>. The input parameters include the following entries: name, mtu, netmask, address, gateway.
PATCH /api/v1/interfaces/25
{
"name": "interface_name",
"address": "9.151.151.3"
}
The response to the request is as follows:
OK 200
{
"name": "interface_name",
"array": "pu16",
"module": "1:Module:1",
"type": "iSCSI",
"address": "9.151.151.3",
"netmask": "255.255.255.248",
"gateway": "9.151.151.222",
"address6": "",
"gateway6": "",
"mtu": "1500",
"ports": "1",
"id": 25
}
- Mandatory – name, address, array, netmask, module, ports.
- Optional – mtu, gateway.
POST /api/v1/interfaces
{
"name": "iSCSI_1_1",
"array": "pu16",
"module": "1:Module:1",
"address": "9.151.151.151",
"netmask": "255.255.255.248",
"gateway": "9.151.151.222",
"mtu": "1500",
"ports": "1"
}
The response to the request is as follows:
OK 200
{
"name": "iSCSI_1_1",
"array": "pu16",
"module": "1:Module:1",
"type": "iSCSI",
"address": "9.151.151.151",
"netmask": "255.255.255.248",
"gateway": "9.151.151.222",
"address6": "",
"gateway6": "",
"mtu": "1500",
"ports": "1",
"id": 25
}
You can delete an iSCSI interface by issuing the DELETE command with the following syntax: DELETE /api/v1/interfaces/<interface-id>.
For example, DELETE /api/v1/interfaces/1 deletes the interface with identification number 1.