Query NVMe Lun

GET/zstack/v1/storage-devices/nvme/luns
GET/zstack/v1/storage-devices/nvme/luns/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/luns
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/storage-devices/nvme/luns/066996e131e03824a7ef6a22defed432

Queryable Fields

Run the CLI command tool, enter QueryNvmeLun and press Tab to view all queryable fields and resource names that can be queried across tables.

API Response

Response Example

{
  "inventories": [
    {
      "nvmeTargetUuid": "f04819a9445c3d068c075e753d48fc3c",
      "nvmeLunHostRefs": [],
      "name": "nvme-lun-36b083fe000daf018000022905ba35d8f",
      "uuid": "138c10cda11c3b8e9c7d988350d5cf64",
      "wwid": "uuid.48daeab7-7f15-405e-8481-7152cb9b0aca",
      "wwn": "uuid.48daeab7-7f15-405e-8481-7152cb9b0aca",
      "serial": "3d87eca1686c1782",
      "type": "disk",
      "path": "nvme-uuid.48daeab7-7f15-405e-8481-7152cb9b0aca ",
      "size": 5497558138880
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.6.21
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error4.6.21
inventoriesListFor details, see inventories4.6.21

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10014.6.21
descriptionStringBrief summary of the error4.6.21
detailsStringDetailed error information4.6.21
elaborationStringReserved field, defaults to null4.6.21
opaqueLinkedHashMapReserved field, defaults to null4.6.21
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null4.6.21

inventories

NameTypeDescriptionStarting Version
nvmeTargetUuidStringNVMe device UUID4.6.21
nameStringResource name4.6.21
uuidStringResource UUID, uniquely identifies the resource4.6.21
wwidStringGlobal unique identifier4.6.21
vendorStringVendor4.6.21
modelStringModel4.6.21
wwnString 4.6.21
serialStringSerial number4.6.21
typeStringType4.6.21
hctlString 4.6.21
pathStringPath4.6.21
stateStringState4.6.21
sizeLongSize4.6.21
multipathDeviceUuidStringMultipath device UUID4.6.21
sourceStringDisk source, NVMe4.6.21
createDateTimestampCreation time4.6.21
lastOpDateTimestampLast modification time4.6.21
nvmeLunHostRefsListFor details, see nvmeLunHostRefs4.6.21

nvmeLunHostRefs

NameTypeDescriptionStarting Version
nvmeLunUuidListNVMe disk UUID4.6.21
hostUuidStringHost UUID4.6.21
pathStringDisk path4.6.21
hctlStringDisk HCTL4.6.21
createDateTimestampCreation time4.6.21
lastOpDateTimestampLast modification time4.6.21

SDK Examples

Java SDK

QueryNvmeLunAction action = new QueryNvmeLunAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryNvmeLunAction.Result res = action.call();

Python SDK

QueryNvmeLunAction action = QueryNvmeLunAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryNvmeLunAction.Result res = action.call()