| Skip Navigation Links | |
| Exit Print View | |
|
Oracle® ZFS Storage Appliance RESTful Application Programming Interface |
Creates a new target. The request body has a JSON object with a single name property that is the name of the new iSCSI target group.
Example Request:
POST /api/san/v1/iscsi/targets HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic abcd123MWE=
Content-Type: application/json
Content-Length: 23
Accept: application/json
{"alias": "test-target"}
Example Response:
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 233
X-Zfssa-San-Api: 1.0
Location: /api/san/v1/iscsi/targets/iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008
{
"target": {
"href": "/api/san/v1/iscsi/targets/iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008",
"alias": "test-target",
"iqn": "iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008",
"auth": "none",
"targetchapuser": "",
"targetchapsecret": "",
"interfaces": ["ixgbe0"]
}
}