Create an iSCSI initiator
POST
/iscsi/initiators
const url = 'https://sylve.lan:8181/api/iscsi/initiators';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"authMethod":"example","chapName":"example","chapSecret":"example","initiatorName":"example","nickname":"example","targetAddress":"example","targetName":"example","tgtChapName":"example","tgtChapSecret":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/iscsi/initiators \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "authMethod": "example", "chapName": "example", "chapSecret": "example", "initiatorName": "example", "nickname": "example", "targetAddress": "example", "targetName": "example", "tgtChapName": "example", "tgtChapSecret": "example" }'Create an iSCSI initiator and regenerate the initiator configuration
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”ISCSI initiator settings
Media typeapplication/json
object
authMethod
string
chapName
string
chapSecret
string
initiatorName
string
nickname
string
targetAddress
string
targetName
string
tgtChapName
string
tgtChapSecret
string
Examplegenerated
{ "authMethod": "example", "chapName": "example", "chapSecret": "example", "initiatorName": "example", "nickname": "example", "targetAddress": "example", "targetName": "example", "tgtChapName": "example", "tgtChapSecret": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Payload Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "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"}