QueryVip
API Request
URLs
GET zstack/v1/vips
GET zstack/v1/vips/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth fbe1443215334b0aa609b5417f5f36ab" \
-X GET http://localhost:8080/zstack/v1/vips?q=uuid=ba1cf7be9f20433fa5091bec091ba22d
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 39036aee2ef641afac5b253aae2377be" \
-X GET http://localhost:8080/zstack/v1/vips/a077653982cb422daa06e6c2d840b140
Queryable Fields
You can check all queryable fields and resource names that can be queried across
tables by using zstack-cli, entering QueryVip
,
and pressing the Tab key.
API Response
Sample
Response
{
"inventories": [
{
"uuid": "8c5eb4938be549218fda4c87de4d8cad",
"name": "new name",
"ipRangeUuid": "7d0dda5b1c4f40069ec4cfd6b66bdf48",
"l3NetworkUuid": "a81054a6807e47a09922473e9ab376cb",
"ip": "192.168.0.1",
"state": "Enabled",
"gateway": "127.0.0.1",
"netmask": "255.255.0.0",
"peerL3NetworkUuid": [
"64ef7a2ea9ec4095b343ea239a7ba344"
]
}
]
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
inventories | List | See inventories. | 0.6 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
#inventories
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 0.6 |
name | String | The resource name. | 0.6 |
description | String | The detailed description of the resource. | 0.6 |
l3NetworkUuid | String | The L3 network UUID. | 0.6 |
ip | String | The IP address of the IPv4 type. | 0.6 |
state | String | The state of the VIP, including Enabled and Enabled. | 0.6 |
gateway | String | The gateway. | 0.6 |
netmask | String | The netmask. | 0.6 |
prefixLen | String | The prefix length. | 3.1.0 |
serviceProvider | String | The service provider that provides the VIP service. | 0.6 |
peerL3NetworkUuid | String | The L3 private network UUID or the VPC L3 network UUID. | 0.6 |
useFor | String | The usage, such as port forwarding. | 0.6 |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
SDK Sample
Java
SDK
QueryVipAction action = new QueryVipAction();
action.conditions = asList("uuid=0a573b1c687246ff970c04ef5d0eaf07");
action.sessionId = "bf2f206d12d742d3a9182ea663e12265";
QueryVipAction.Result res = action.call();
Python
SDK
QueryVipAction action = QueryVipAction()
action.conditions = ["uuid=5a3bf1e979944ea4a958fdac5a8bcef2"]
action.sessionId = "bc563fd71d014e84a49f1d280ef020ff"
QueryVipAction.Result res = action.call()