The iSCSI initiator commands are used to manage iSCSI initiators and iSCSI initiator groups on an appliance. The available commands are listed in the table below.
|
These commands use the following URI parameters.
|
Each initiator group has a "name" property and an "initiators" property that contains a list of initiators in the initiator group.
Lists all available iSCSI initiator groups. On success HTTP Status 200 (OK) is returned and the body contains a JSON object with a property named “groups” that contains an array of initiator group objects.
Example Request:
GET /api/san/v1/iscsi/initiator-groups HTTP/1.1 Host: zfs-storage.example.com Accept: application/json
Example Response:
HTTP/1.1 200 OK Content-Type: application/json { "groups": [{ "href": "/san/v1/iscsi/initiator-groups/aktest-initiators-0", "initiators": ["iqn.1986-03.com.sun:0"], "name": "aktest-initiators-0" }, { "href": "/san/v1/iscsi/initiator-groups/aktest-initiators-1", "initiators": ["iqn.1986-03.com.sun:1"], "name": "aktest-initiators-1" }] }
Gets detailed information from a single iSCSI initiator group. The group can be accessed by following the href property returned in the list initiator group command.
Example Request:
GET /api/san/v1/iscsi/initiator-groups/test-group HTTP/1.1 Host: zfs-storage.example.com Accept: application/json
Example Response:
HTTP/1.1 200 OK Content-Type: application/json { "group": { "href": "/api/san/v1/iscsi/initiator-groups/test-group" "initiators": ["iqn.1986-03.com.sun:02:01"], "name": "test-group" } }
Creates an iSCSI initiator group with no members. The request body contains a JSON object with a single "name" parameter containing the group name.
|
Example Request:
POST /api/san/v1/iscsi/initiator-groups HTTP/1.1 Host: zfs-storage.example.com Content-Type: application/json Content-Length: 64 Accept: application/json { "name":"group-01", "initiators": ["iqn.1986-03.com.sun:02"] }
Example Response:
HTTP/1.1 201 Created Content-Type: application/json Location: /api/san/v1/iscsi/initiator-groups/test-group { "group": { "href": "/api/san/v1/iscsi/initiator-groups/test-group", "initiators": ["iqn.1986-03.com.sun:02"], "name": "group-01" } }
Removes an initiator group from the appliance.
Example Request:
DELETE /api/san/v1.0/iscsi/initiator-groups/group-01 HTTP/1.1 Host: zfs-storage.example.com:215
Successful delete returns HTTP Status 204 (No Content):
HTTP/1.1 204 No-Content