Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

Create an iSCSI target

Creates an iSCSI target.

HTTP request syntax (URI)
POST <base_URI>/v7/storage/iscsi-targets/
Parameters
Name Type Required Values Description
secret BODY Y string iSCSI secret.
comment BODY Y string Comment at iSCSI creation.
iSCSIName BODY Y string Name of the iSCSI target.
accessConfig BODY Y string Access configuration.
enableAuthentication BODY Y boolean Enable authentication flag.
iSCSIlogicalUnit BODY N array Array of iSCSI logical unit objects.
virtualServerId BODY Y number Virtual server ID.
Return codes
Code Data Description
201 iscsi iSCSI target object created successfully
400 No Data Missing or invalid request contents.
404 Error Message Requested resource not found.
500 Error message Error associated with the storage system.
501 No Data Server has not implemented the request operation on the resource.

Any HTTP status code other than 201 indicates that the API did not complete successfully.

NoteThe underlying virtual server should have an iSCSI domain name assigned to create an iSCSI Target.
Request example
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.58.119:8444/v7/storage/iscsi-targets -d'{"secret":"HitachiHitachi", "comment":"IscsiTargetCreate2","iSCSIName":"xyz-iscsi-test-5", "accessConfig":"","enableAuthentication":true, "iSCSIlogicalUnit":[], "virtualServerId":8}' -X POST
Response example
HTTP/1.1 201 Created 
{
		"iSCSITarget" : {
			"accessConfig" : "",
			"comment" : "IscsiTargetCreate2",
			"globalUniqueName" : "iqn.2016-09.xyzdo1875:xyzvs4014.xyzis6554",
			"iSCSIId" : "xyz-iscsi-test-5",
			"iSCSIlogicalUnit" : [],
			"objectId" : "31323a3a3a6d6574726f495336353534",
			"isAuthenticationEnabled" : true,
                     "isRegenerateGUN" : false,	
			"secret" : "HitachiHitachi",
			"virtualServerId" : 8 
             },
	      "uri" : "https://172.17.57.178:8444/v7/storage/iscsi-targets/31323a3a3a6d6574726f495336353534"	
}

 

  • Was this article helpful?