Skip to main content
A newer release of this product is available.

Retrieve iSCSI sessions

Contributors

GET /protocols/san/iscsi/sessions

Introduced In: 9.6

Retrieves iSCSI sessions.

  • vserver iscsi connection show

  • vserver iscsi session parameter show

  • vserver iscsi session show

Parameters

Name Type In Required Description

isid

string

query

False

Filter by isid

tsih

integer

query

False

Filter by tsih

svm.uuid

string

query

False

Filter by svm.uuid

svm.name

string

query

False

Filter by svm.name

igroups.uuid

string

query

False

Filter by igroups.uuid

igroups.name

string

query

False

Filter by igroups.name

initiator.comment

string

query

False

Filter by initiator.comment

  • Introduced in: 9.9

initiator.name

string

query

False

Filter by initiator.name

initiator.alias

string

query

False

Filter by initiator.alias

connections.cid

integer

query

False

Filter by connections.cid

connections.interface.ip.address

string

query

False

Filter by connections.interface.ip.address

connections.interface.ip.port

integer

query

False

Filter by connections.interface.ip.port

connections.interface.name

string

query

False

Filter by connections.interface.name

connections.interface.uuid

string

query

False

Filter by connections.interface.uuid

connections.initiator_address.address

string

query

False

Filter by connections.initiator_address.address

connections.initiator_address.port

integer

query

False

Filter by connections.initiator_address.port

connections.authentication_type

string

query

False

Filter by connections.authentication_type

target_portal_group

string

query

False

Filter by target_portal_group

target_portal_group_tag

integer

query

False

Filter by target_portal_group_tag

fields

array[string]

query

False

Specify the fields to return.

max_records

integer

query

False

Limit the number of records returned.

return_records

boolean

query

False

The default is true for GET calls. When set to false, only the number of records is returned.

  • Default value: 1

return_timeout

integer

query

False

The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.

  • Default value: 1

  • Max value: 120

  • Min value: 0

order_by

array[string]

query

False

Order results by specified fields and optional [asc

Response

Status: 200, Ok
Name Type Description

_links

_links

num_records

integer

Number of records.

records

array[iscsi_session]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "records": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "connections": {
      "_links": {
        "next": {
          "href": "/api/resourcelink"
        },
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "authentication_type": "chap",
      "cid": 0,
      "initiator_address": {
        "address": "10.10.10.7",
        "port": "55432"
      },
      "interface": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "ip": {
          "address": "10.10.10.7",
          "port": "3260"
        },
        "name": "lif1",
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      }
    },
    "igroups": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "igroup1",
      "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
    },
    "initiator": {
      "alias": "initiator_alias1",
      "comment": "This is an iSCSI initiator for host 5",
      "name": "iqn.1992-01.example.com:string"
    },
    "isid": "61:62:63:64:65:00",
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    },
    "target_portal_group": "tpgroup1",
    "target_portal_group_tag": 0,
    "tsih": 0
  }
}

Error

Status: Default, Error
Name Type Description

error

error

Example error
{
  "error": {
    "arguments": {
      "code": "string",
      "message": "string"
    },
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

next

href

self

href

Name Type Description

self

href

initiator_address

The TCP socket information for the initiator end of the connection. This is useful for network packet debugging.

Name Type Description

address

string

The TCP IPv4 or IPv6 address of the initiator end of the iSCSI connection.

port

integer

The TCP port number of the initiator end of the iSCSI connection.

ip

The IP information. ONTAP only supports port 3260.

Name Type Description

address

string

IPv4 or IPv6 address

port

integer

The TCP port number of the iSCSI access endpoint.

interface

The network interface information for the target end of the connection.

Name Type Description

_links

_links

ip

ip

The IP information. ONTAP only supports port 3260.

  • readOnly: 1

  • Introduced in: 9.6

name

string

The name of the interface.

uuid

string

The UUID that uniquely identifies the interface.

iscsi_connection

An active iSCSI connection.

Name Type Description

_links

_links

authentication_type

string

The iSCSI authentication type used to establish the connection.

cid

integer

The identifier of the connection within the session.

initiator_address

initiator_address

The TCP socket information for the initiator end of the connection. This is useful for network packet debugging.

interface

interface

The network interface information for the target end of the connection.

igroups

Name Type Description

_links

_links

name

string

The name of the initiator group.

uuid

string

The unique identifier of the initiator group.

initiator

The initiator that created the session.

Name Type Description

alias

string

The initiator alias.

comment

string

A comment available for use by the administrator. This is modifiable from the initiator REST endpoint directly. See PATCH /protocols/san/igroups/{igroup.uuid}/initiators/{name} .

name

string

The world wide unique name of the initiator.

svm

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

iscsi_session

An iSCSI session is one or more TCP connections that link an iSCSI initiator with an iSCSI target. TCP connections can be added and removed from an iSCSI session by the iSCSI initiator. Across all TCP connections within an iSCSI session, an initiator sees one and the same target. After the connection is established, iSCSI control, data, and status messages are communicated over the session.

Name Type Description

_links

_links

connections

array[iscsi_connection]

The iSCSI connections that make up the iSCSI session.

igroups

array[igroups]

The initiator groups in which the initiator is a member.

initiator

initiator

The initiator that created the session.

isid

string

The initiator portion of the session identifier specified by the initiator during login.

svm

svm

target_portal_group

string

The target portal group to which the session belongs.

target_portal_group_tag

integer

The target portal group tag of the session.

tsih

integer

The target session identifier handle (TSIH) of the session.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.