Query Host Kernel Interface

GET/zstack/v1/l2-networks/kernel-interfaces
GET/zstack/v1/l2-networks/kernel-interfaces/{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/l2-networks/kernel-interfaces
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/l2-networks/kernel-interfaces/2eeff10481233dd48b1ffc6ed7c3d4fc

Queryable Fields

Run the CLI command tool, enter QueryHostKernelInterface and press Tab to view all queryable fields and resource names that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "7be0a19c5d083b52abaf98205478c7e2",
      "name": "test-kernel",
      "description": "test-kernel",
      "hostUuid": "3f79834ddf6f3e118dcb5abaa33489cc",
      "l2NetworkUuid": "4a9e06dbe8d6375a8f8f002ea50b7121",
      "l3NetworkUuid": "7cec7a1b63c732498be3d7a45c7076a5",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.1.0
inventoryListSee inventory4.1.0
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error4.1.0

inventory

NameTypeDescriptionStarting Version
uuidStringUUID of the resource, uniquely identifies the resource4.1.0
nameStringResource name4.1.0
descriptionStringResource description4.1.0
hostUuidStringHost UUID4.1.0
l2PortGroupUuidStringPort group UUID4.1.0
l3NetworkUuidStringDistributed Port Group UUID4.1.0
usedIpsListIP configuration4.1.0
trafficTypesListTraffic type4.1.0
createDateTimestampCreate date4.1.0
lastOpDateTimestampLast update date4.1.0

error

NameTypeDescriptionStarting Version
codeStringError code, a globally unique identifier of the error, e.g. SYS.1000, HOST.10014.1.0
descriptionStringBrief description of the error4.1.0
detailsStringDetailed error information4.1.0
elaborationStringReserved field, defaults to null4.1.0
opaqueLinkedHashMapReserved field, defaults to null4.1.0
causeErrorCodeRoot cause, the source error that caused the current error, null if no original error4.1.0

SDK Examples

Java SDK

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

Python SDK

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