List iSCSI targets
GET
/iscsi/targets
const url = 'https://sylve.lan:8181/api/iscsi/targets';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sylve.lan:8181/api/iscsi/targets \ --header 'Authorization: <Authorization>'Retrieve all configured iSCSI targets with their portals and LUNs
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
Array<object>
object
alias
string
authMethod
string
chapName
string
createdAt
string
id
integer
luns
Array<object>
object
createdAt
string
id
integer
lunNumber
integer
targetId
integer
updatedAt
string
zvol
string
mutualChapName
string
portals
Array<object>
object
address
string
createdAt
string
id
integer
port
integer
targetId
integer
updatedAt
string
targetName
string
updatedAt
string
error
string
message
string
status
string
Examplegenerated
{ "data": [ { "alias": "example", "authMethod": "example", "chapName": "example", "createdAt": "example", "id": 1, "luns": [ { "createdAt": "example", "id": 1, "lunNumber": 1, "targetId": 1, "updatedAt": "example", "zvol": "example" } ], "mutualChapName": "example", "portals": [ { "address": "example", "createdAt": "example", "id": 1, "port": 1, "targetId": 1, "updatedAt": "example" } ], "targetName": "example", "updatedAt": "example" } ], "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}