Query PCI Device Spec

GET/zstack/v1/pci-device-specs
GET zstack/v1/pci-device-specs/{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/pci-device-specs?q=uuid=148eb0059a193de59e5278395c36baa7
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/pci-device-specs/f5caf15dfb98366cbf87d41aa01385b9

Queryable Fields

Run the CLI command tool, enter QueryPciDeviceSpec and press Tab to view all queryable fields and cross-resource names.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "6a2537202e134f9fa240f0455fc507cc",
      "name": "MSI_GTX1060",
      "description": "NVIDIA Corporation, GP106 [GeForce GTX 1060 6GB], a1, VGA compatible controller",
      "vendorId": "10de",
      "deviceId": "1c03",
      "subvendorId": "1462",
      "subdeviceId": "3283",
      "type": "GPU_Video_Controller",
      "state": "Enabled",
      "romVersion": "86.06.0E.00.28",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error3.5.0
inventoriesListSee inventories3.5.0

error

NameTypeDescriptionStarting Version
codeStringError code, a globally unique identifier of the error, e.g. SYS.1000, HOST.10013.5.0
descriptionStringBrief description of the error3.5.0
detailsStringDetailed error information3.5.0
elaborationStringReserved field, defaults to null3.5.0
opaqueLinkedHashMapReserved field, defaults to null3.5.0
causeErrorCodeRoot cause, the source error that caused the current error, null if no original error3.5.0

inventories

NameTypeDescriptionStarting Version
uuidStringUUID of the resource, uniquely identifies the resource3.5.0
nameStringResource name3.5.0
descriptionStringResource description3.5.0
vendorIdStringVendor ID3.5.0
deviceIdStringDevice ID3.5.0
subvendorIdStringSub-vendor ID3.5.0
subdeviceIdStringSub-device ID3.5.0
ramSizeStringGPU memory capacity3.5.0
maxPartNumIntegerMaximum partition number3.5.0
isVirtualBooleanWhether it is a virtual device3.5.0
romVersionStringFirmware version3.5.0
romMd5sumStringFirmware MD53.5.0
createDateTimestampCreate date3.5.0
lastOpDateTimestampLast update date3.5.0
typePciDeviceTypeSee type3.5.0
statePciDeviceSpecStateSee state3.5.0

type

NameTypeDescriptionStarting Version
GPU_Video_ControllerPciDeviceTypeGPU video controller2.1
GPU_Audio_ControllerPciDeviceTypeGPU audio controller2.1
GPU_3D_ControllerPciDeviceTypeGPU 3D controller2.1
Moxa_DevicePciDeviceTypeMOXA card2.1
GenericPciDeviceTypeGeneric device2.1

state

NameTypeDescriptionStarting Version
EnabledPciDeviceSpecStateEnabled3.5.0
DisabledPciDeviceSpecStateDisabled3.5.0

SDK Examples

Java SDK

QueryPciDeviceSpecAction action = new QueryPciDeviceSpecAction();
action.conditions = asList("uuid=96a05dc8dbee32ddb15c63680df63792");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryPciDeviceSpecAction.Result res = action.call();

Python SDK

QueryPciDeviceSpecAction action = QueryPciDeviceSpecAction()
action.conditions = ["uuid=362f676642ba3288bf02c98fcee26d74"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryPciDeviceSpecAction.Result res = action.call()