iSCSI Resources

GlobalConfiguration

The Global Configuration resource represents the configuration settings for iSCSI.

List resource

GET /api/v1.0/services/iscsi/globalconfiguration/

Returns the iSCSI Global Configuration settings dictionary.

Example request:

GET /api/v1.0/services/iscsi/globalconfiguration/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "iscsi_basename": "iqn.2011-03.org.example.istgt",
          "iscsi_isns_servers": "",
          "iscsi_pool_avail_threshold": null,
          "id": 1
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/iscsi/globalconfiguration/

Update Global Configuration.

Example request:

PUT /api/v1.0/services/iscsi/globalconfiguration/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_maxconnect": 16
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "iscsi_basename": "iqn.2011-03.org.example.istgt",
          "id": 1
  }
JSON Parameters:
 
  • iscsi_basename (string) – base name (e.g. iqn.2007-09.jp.ne.peach.istgt, see RFC 3720 and 3721 for details)
  • iscsi_isns_servers (string) – List of Internet Storage Name Service (iSNS) Servers
  • iscsi_pool_avail_threshold (integer) – pool capacity warning threshold when using zvol extents
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 202 – no error

Extent

The Extent resource represents extents for the iSCSI targets.

List resource

GET /api/v1.0/services/iscsi/extent/

Returns a list of all extents.

Example request:

GET /api/v1.0/services/iscsi/extent/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "iscsi_target_extent_comment": "",
          "iscsi_target_extent_type": "File",
          "iscsi_target_extent_name": "extent",
          "iscsi_target_extent_filesize": "10MB",
          "iscsi_target_extent_insecure_tpc": true,
          "iscsi_target_extent_naa": "0x3822690834aae6c5",
          "id": 1,
          "iscsi_target_extent_path": "/mnt/tank/iscsi"
          "iscsi_target_extent_xen": false,
          "iscsi_target_extent_avail_threshold": null,
          "iscsi_target_extent_blocksize": 512,
          "iscsi_target_extent_pblocksize": false,
          "iscsi_target_extent_rpm": "SSD",
          "iscsi_target_extent_ro": false,
          "iscsi_target_extent_serial": "08002724ab5601"
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/services/iscsi/extent/

Creates a new extent and returns the new extent object.

Example request:

POST /api/v1.0/services/iscsi/extent/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_extent_type": "File",
          "iscsi_target_extent_name": "extent",
          "iscsi_target_extent_filesize": "10MB",
          "iscsi_target_extent_path": "/mnt/tank/iscsi"
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_extent_comment": "",
          "iscsi_target_extent_type": "File",
          "iscsi_target_extent_name": "extent",
          "iscsi_target_extent_filesize": "10MB",
          "iscsi_target_extent_insecure_tpc": true,
          "iscsi_target_extent_naa": "0x3822690834aae6c5",
          "id": 1,
          "iscsi_target_extent_path": "/mnt/tank/iscsi"
          "iscsi_target_extent_xen": false,
          "iscsi_target_extent_avail_threshold": null,
          "iscsi_target_extent_blocksize": 512,
          "iscsi_target_extent_pblocksize": false,
          "iscsi_target_extent_rpm": "SSD",
          "iscsi_target_extent_ro": false,
          "iscsi_target_extent_serial": "08002724ab5601"
  }
JSON Parameters:
 
  • iscsi_target_extent_name (string) – identifier of the extent
  • iscsi_target_extent_type (string) – File, Disk
  • iscsi_target_extent_path (string) – path to the extent (for File type)
  • iscsi_target_extent_disk (string) – path to the disk or zvol (for Disk type) e.g. “zvol/tank/zvol1”, “ada1”
  • iscsi_target_extent_filesize (string) – size of extent, 0 means auto, a raw number is bytes, or suffix with KB, MB, TB for convenience
  • iscsi_target_extent_insecure_tpc (boolean) – allow initiators to xcopy without authenticating to foreign targets
  • iscsi_target_extent_xen (boolean) – Xen initiator compat mode
  • iscsi_target_extent_comment (string) – user description
  • iscsi_target_extent_avail_threshold (integer) – Remaining dataset/zvol capacity warning threshold
  • iscsi_target_extent_blocksize (integer) – Logical Block Size
  • iscsi_target_extent_pblocksize (boolean) – Disable Physical Block Size Reporting
  • iscsi_target_extent_rpm (string) – Unknown, SSD, 5400, 7200, 10000, 15000
  • iscsi_target_extent_serial (string) – Serial number for the logical unit
  • iscsi_target_extent_ro (boolean) – Read-only extent
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Create extent using zvol.

POST /api/v1.0/services/iscsi/extent/

Creates a new extent using zvol and returns the new extent object.

Example request:

POST /api/v1.0/services/iscsi/extent/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_extent_type": "Disk",
          "iscsi_target_extent_name": "zvolextent",
          "iscsi_target_extent_disk": "zvol/tank/zvolextent"
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_extent_comment": "",
          "iscsi_target_extent_type": "ZVOL",
          "iscsi_target_extent_name": "zvolextent",
          "iscsi_target_extent_filesize": "0",
          "iscsi_target_extent_insecure_tpc": true,
          "iscsi_target_extent_naa": "0x3822690834aae6c5",
          "id": 1,
          "iscsi_target_extent_path": "/dev/zvol/tank/zvolextent",
          "iscsi_target_extent_xen": false,
          "iscsi_target_extent_avail_threshold": null,
          "iscsi_target_extent_blocksize": 512,
          "iscsi_target_extent_pblocksize": false,
          "iscsi_target_extent_rpm": "SSD",
          "iscsi_target_extent_ro": false,
          "iscsi_target_extent_serial": "08002724ab5601"
  }

Update resource

PUT /api/v1.0/services/iscsi/extent/(int: id)/

Update extent id.

Example request:

PUT /api/v1.0/services/iscsi/extent/1/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_extent_filesize": "20MB"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_extent_comment": "",
          "iscsi_target_extent_type": "File",
          "iscsi_target_extent_name": "extent",
          "iscsi_target_extent_filesize": "20MB",
          "iscsi_target_extent_insecure_tpc": true,
          "iscsi_target_extent_naa": "0x3822690834aae6c5",
          "id": 1,
          "iscsi_target_extent_path": "/mnt/tank/iscsi"
          "iscsi_target_extent_xen": false,
          "iscsi_target_extent_avail_threshold": null,
          "iscsi_target_extent_blocksize": 512,
          "iscsi_target_extent_pblocksize": false,
          "iscsi_target_extent_rpm": "SSD",
          "iscsi_target_extent_serial": "08002724ab5601"
  }
JSON Parameters:
 
  • iscsi_target_extent_name (string) – identifier of the extent
  • iscsi_target_extent_type (string) – File, Disk
  • iscsi_target_extent_path (string) – path to the extent (for File type)
  • iscsi_target_extent_disk (string) – path to the disk or zvol (for Disk type) e.g. “zvol/tank/zvol1”, “ada1”
  • iscsi_target_extent_filesize (string) – size of extent, 0 means auto, a raw number is bytes, or suffix with KB, MB, TB for convenience
  • iscsi_target_extent_insecure_tpc (boolean) – allow initiators to xcopy without authenticating to foreign targets
  • iscsi_target_extent_xen (boolean) – Xen initiator compat mode
  • iscsi_target_extent_comment (string) – user description
  • iscsi_target_extent_avail_threshold (integer) – Remaining dataset/zvol capacity warning threshold
  • iscsi_target_extent_blocksize (integer) – Logical Block Size
  • iscsi_target_extent_pblocksize (boolean) – Disable Physical Block Size Reporting
  • iscsi_target_extent_rpm (string) – Unknown, SSD, 5400, 7200, 10000, 15000
  • iscsi_target_extent_serial (string) – Serial number for the logical unit
  • iscsi_target_extent_ro (boolean) – Read-only extent
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 202 – no error

Delete resource

DELETE /api/v1.0/services/iscsi/extent/(int: id)/

Delete extent id.

Example request:

DELETE /api/v1.0/services/iscsi/extent/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Authorized Initiator

The Authorized Initiator resource represents network authorized to access to the iSCSI target.

List resource

GET /api/v1.0/services/iscsi/authorizedinitiator/

Returns a list of all authorized initiators.

Example request:

GET /api/v1.0/services/iscsi/authorizedinitiator/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "iscsi_target_initiator_initiators": "ALL",
          "iscsi_target_initiator_comment": "",
          "iscsi_target_initiator_auth_network": "ALL",
          "id": 1,
          "iscsi_target_initiator_tag": 1
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/services/iscsi/authorizedinitiator/

Creates a new authorized initiator and returns the new object.

Example request:

POST /api/v1.0/services/iscsi/authorizedinitiator/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_initiator_initiators": "ALL",
          "iscsi_target_initiator_auth_network": "ALL",
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_initiator_initiators": "ALL",
          "iscsi_target_initiator_comment": "",
          "iscsi_target_initiator_auth_network": "ALL",
          "id": 1,
          "iscsi_target_initiator_tag": 1
  }
JSON Parameters:
 
  • iscsi_target_initiator_initiators (string) – initiator authorized to access to the iSCSI target
  • iscsi_target_initiator_auth_network (string) – network authorized to access to the iSCSI target, it takes IP or CIDR addresses or “ALL” for any IPs
  • scsi_target_initiator_comment (string) – description for your reference
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/services/iscsi/authorizedinitiator/(int: id)/

Update authorized initiator id.

Example request:

PUT /api/v1.0/services/iscsi/authorizedinitiator/1/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_initiator_auth_network": "192.168.3.0/24"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_initiator_initiators": "ALL",
          "iscsi_target_initiator_comment": "",
          "iscsi_target_initiator_auth_network": "192.168.3.0/24",
          "id": 1,
          "iscsi_target_initiator_tag": 1
  }
JSON Parameters:
 
  • iscsi_target_initiator_initiators (string) – initiator authorized to access to the iSCSI target
  • iscsi_target_initiator_auth_network (string) – network authorized to access to the iSCSI target, it takes IP or CIDR addresses or “ALL” for any IPs
  • scsi_target_initiator_comment (string) – description for your reference
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 202 – no error

Delete resource

DELETE /api/v1.0/services/iscsi/authorizedinitiator/(int: id)/

Delete authorized initiator id.

Example request:

DELETE /api/v1.0/services/iscsi/authorizedinitiator/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Auth Credential

The Auth Credential resource represents user credentials to access the iSCSI target.

List resource

GET /api/v1.0/services/iscsi/authcredential/

Returns a list of all auth credentials.

Example request:

GET /api/v1.0/services/iscsi/authcredential/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "iscsi_target_auth_secret": "secret",
          "iscsi_target_auth_peeruser": "peeruser",
          "iscsi_target_auth_peersecret": "peersecret",
          "iscsi_target_auth_user": "user",
          "iscsi_target_auth_tag": 1,
          "id": 1
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/services/iscsi/authcredential/

Creates a new auth credential and returns the new object.

Example request:

POST /api/v1.0/services/iscsi/authcredential/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_auth_secret": "secret",
          "iscsi_target_auth_peeruser": "peeruser",
          "iscsi_target_auth_peersecret": "peersecret",
          "iscsi_target_auth_user": "user",
          "iscsi_target_auth_tag": 1
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_auth_secret": "secret",
          "iscsi_target_auth_peeruser": "peeruser",
          "iscsi_target_auth_peersecret": "peersecret",
          "iscsi_target_auth_user": "user",
          "iscsi_target_auth_tag": 1,
          "id": 1
  }
JSON Parameters:
 
  • iscsi_target_auth_tag (string) – group id
  • iscsi_target_auth_user (string) – target side user name
  • iscsi_target_auth_secret (string) – target side secret
  • iscsi_target_auth_peeruser (string) – initiator side user name
  • iscsi_target_auth_peersecret (string) – initiator side secret
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/services/iscsi/authcredential/(int: id)/

Update auth credential id.

Example request:

PUT /api/v1.0/services/iscsi/authcredential/1/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_auth_peeruser": "myuser"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_auth_secret": "secret",
          "iscsi_target_auth_peeruser": "myuser",
          "iscsi_target_auth_peersecret": "peersecret",
          "iscsi_target_auth_user": "user",
          "iscsi_target_auth_tag": 1,
          "id": 1
  }
JSON Parameters:
 
  • iscsi_target_auth_tag (string) – group id
  • iscsi_target_auth_user (string) – target side user name
  • iscsi_target_auth_secret (string) – target side secret
  • iscsi_target_auth_peeruser (string) – initiator side user name
  • iscsi_target_auth_peersecret (string) – initiator side secret
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 202 – no error

Delete resource

DELETE /api/v1.0/services/iscsi/authcredential/(int: id)/

Delete auth credential id.

Example request:

DELETE /api/v1.0/services/iscsi/authcredential/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Target

The Target resource represents user credentials to access the iSCSI target.

List resource

GET /api/v1.0/services/iscsi/target/

Returns a list of all targets.

Example request:

GET /api/v1.0/services/iscsi/target/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "iscsi_target_name": "target",
          "iscsi_target_alias": null,
          "id": 1
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/services/iscsi/target/

Creates a new target and returns the new object.

Example request:

POST /api/v1.0/services/iscsi/target/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_name": "target"
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_name": "target",
          "iscsi_target_alias": null,
          "id": 1
  }
JSON Parameters:
 
  • iscsi_target_name (string) – Base Name will be appended automatically when starting without “iqn.”.
  • iscsi_target_alias (string) – optional user-friendly string of the target
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/services/iscsi/target/(int: id)/

Update target id.

Example request:

PUT /api/v1.0/services/iscsi/target/1/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_alias": "test"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_name": "target",
          "iscsi_target_alias": "test",
          "id": 1
  }
JSON Parameters:
 
  • iscsi_target_name (string) – Base Name will be appended automatically when starting without “iqn.”.
  • iscsi_target_alias (string) – optional user-friendly string of the target
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 202 – no error

Delete resource

DELETE /api/v1.0/services/iscsi/target/(int: id)/

Delete target id.

Example request:

DELETE /api/v1.0/services/iscsi/target/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

TargetGroup

The TargetGroup resource represents groups associated to iSCSI target.

List resource

GET /api/v1.0/services/iscsi/targetgroup/

Returns a list of all targets.

Example request:

GET /api/v1.0/services/iscsi/targetgroup/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
    "iscsi_target": 1,
    "iscsi_target_authgroup": null,
    "iscsi_target_portalgroup": 1,
    "iscsi_target_initiatorgroup": null,
    "iscsi_target_authtype": "None",
    "iscsi_target_initialdigest": "Auto"
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/services/iscsi/targetgroup/

Creates a new target group and returns the new object.

Example request:

POST /api/v1.0/services/iscsi/targetgroup/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target": 1,
          "iscsi_target_authgroup": null,
          "iscsi_target_authtype": "None",
          "iscsi_target_portalgroup": 1,
          "iscsi_target_initiatorgroup": null,
          "iscsi_target_initialdigest": "Auto"
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "id": 1,
          "iscsi_target": 1,
          "iscsi_target_authgroup": null,
          "iscsi_target_authtype": "None",
          "iscsi_target_portalgroup": 1,
          "iscsi_target_initiatorgroup": null,
          "iscsi_target_initialdigest": "Auto"
  }
JSON Parameters:
 
  • iscsi_target (integer) – id of the target object
  • iscsi_target_initiatorgroup (integer) – id of the initiator object
  • iscsi_target_portalgroup (integer) – id of the portal object
  • iscsi_target_authgroup (integer) – number of the authentication group
  • iscsi_target_initialdigest (string) – defaults to Auto
  • iscsi_target_authtype (string) – None, CHAP, CHAP Mutual
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/services/iscsi/targetgroup/(int: id)/

Update target group id.

Example request:

PUT /api/v1.0/services/iscsi/targetgroup/1/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_initialdigest": "CHAP"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "id": 1,
          "iscsi_target": 1,
          "iscsi_target_authgroup": null,
          "iscsi_target_authtype": "None",
          "iscsi_target_portalgroup": 1,
          "iscsi_target_initiatorgroup": null,
          "iscsi_target_initialdigest": "CHAP"
  }
JSON Parameters:
 
  • iscsi_target (integer) – id of the target object
  • iscsi_target_initiatorgroup (integer) – id of the initiator object
  • iscsi_target_portalgroup (integer) – id of the portal object
  • iscsi_target_authgroup (integer) – number of the authentication group
  • iscsi_target_initialdigest (string) – defaults to Auto
  • iscsi_target_authtype (string) – None, CHAP, CHAP Mutual
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 202 – no error

Delete resource

DELETE /api/v1.0/services/iscsi/targetgroup/(int: id)/

Delete target group id.

Example request:

DELETE /api/v1.0/services/iscsi/targetgroup/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Target To Extent

The Target To Extent resource represents association between targets and extents.

List resource

GET /api/v1.0/services/iscsi/targettoextent/

Returns a list of all target to extent.

Example request:

GET /api/v1.0/services/iscsi/targettoextent/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/services/iscsi/targettoextent/

Creates a new target to extent and returns the new object.

Example request:

POST /api/v1.0/services/iscsi/targettoextent/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target": 1,
          "iscsi_extent": 1
          "iscsi_lunid": null,
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target": 1,
          "iscsi_extent": 1,
          "iscsi_lunid": null,
          "id": 1
  }
JSON Parameters:
 
  • iscsi_target (integer) – id of the target object
  • iscsi_extent (integer) – id of the extent object
  • iscsi_lunid (integer) – id of the LUN
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/services/iscsi/targettoextent/(int: id)/

Update target to extent id.

Example request:

PUT /api/v1.0/services/iscsi/targettoextent/1/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_extent": 2
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target": 1,
          "iscsi_extent": 2,
          "id": 1
  }
JSON Parameters:
 
  • iscsi_target (integer) – id of the target object
  • iscsi_extent (integer) – id of the extent object
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 202 – no error

Delete resource

DELETE /api/v1.0/services/iscsi/targettoextent/(int: id)/

Delete target to extent id.

Example request:

DELETE /api/v1.0/services/iscsi/targettoextent/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

Portal

The Portal resource represents IPs and ports which the daemon will listen to.

List resource

GET /api/v1.0/services/iscsi/portal/

Returns a list of all portals.

Example request:

GET /api/v1.0/services/iscsi/portal/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "iscsi_target_portal_tag": 1,
          "id": 1,
          "iscsi_target_portal_discoveryauthmethod": "None",
          "iscsi_target_portal_discoveryauthgroup": null,
          "iscsi_target_portal_ips": [
                  "0.0.0.0:3260"
          ],
          "iscsi_target_portal_comment": ""
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/services/iscsi/portal/

Creates a new portal and returns the new object.

Example request:

POST /api/v1.0/services/iscsi/portal/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_portal_ips": [
                  "0.0.0.0:3260"
          ]
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_portal_tag": 1,
          "id": 1,
          "iscsi_target_portal_discoveryauthmethod": "None",
          "iscsi_target_portal_discoveryauthgroup": null,
          "iscsi_target_portal_ips": [
                  "0.0.0.0:3260"
          ],
          "iscsi_target_portal_comment": ""
  }
JSON Parameters:
 
  • iscsi_target_portal_comment (string) – user description
  • iscsi_target_portal_ips (list(string)) – IP:PORT to listen to
  • iscsi_target_portal_discoveryauthmethod (string) – None, Auto, CHAP, CHAP Mutual
  • iscsi_target_portal_discoveryauthgroup (string) – id of auth group
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/services/iscsi/portal/(int: id)/

Update portal id.

Example request:

PUT /api/v1.0/services/iscsi/portal/1/ HTTP/1.1
Content-Type: application/json

  {
          "iscsi_target_portal_ips": [
                  "192.168.3.20:3260"
          ]
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "iscsi_target_portal_tag": 1,
          "id": 1,
          "iscsi_target_portal_discoveryauthmethod": "None",
          "iscsi_target_portal_discoveryauthgroup": null,
          "iscsi_target_portal_ips": [
                  "192.168.3.20:3260"
          ],
          "iscsi_target_portal_comment": ""
  }
JSON Parameters:
 
  • iscsi_target_portal_comment (string) – user description
  • iscsi_target_portal_ips (list(string)) – IP:PORT to listen to
  • iscsi_target_portal_discoveryauthmethod (string) – None, Auto, CHAP, CHAP Mutual
  • iscsi_target_portal_discoveryauthgroup (string) – id of auth group
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 202 – no error

Delete resource

DELETE /api/v1.0/services/iscsi/portal/(int: id)/

Delete portal id.

Example request:

DELETE /api/v1.0/services/iscsi/portal/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error