Network ResourcesDistributed Port Group Related Interfaces
QueryIpRange
Headers
Authorization: OAuth the-session-uuidCurl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 8f7b1e0396c54646a4b37affdfdda079" \
-X GET http://localhost:8080/zstack/v1/l3-networks/ip-ranges?q=uuid=887227aa5d5c49e2a8137b79dad3738acurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 60a5dfda1a9843809415eb28f2550f94" \
-X GET http://localhost:8080/zstack/v1/l3-networks/ip-ranges/17684784fcc04571a47eb24dc2eb9638Query Fields
Run the CLI command tool, enter QueryIpRange, and press the Tab key to view all queryable fields and resource names that can be queried across tables.
API Response
Sample Response
{
"inventories": [
{
"l3NetworkUuid": "9a72daf0034443aa81864e593f0f5b32",
"name": "Test-IPRange",
"networkCidr": "192.168.10.0/24"
}
]
}| 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 |
| l3NetworkUuid | String | The L3 network UUID. | 0.6 |
| name | String | The resource name. | 0.6 |
| description | String | The detailed description of the resource. | 0.6 |
| startIp | String | 0.6 | |
| endIp | String | 0.6 | |
| netmask | String | 0.6 | |
| prefixLen | String | The prefix length. | 3.1.0 |
| gateway | String | 0.6 | |
| networkCidr | String | 0.6 | |
| ipVersion | Integer | The IP version. | 3.1.0 |
| addressMode | String | The IPv6 address allocation mode. | 3.1.0 |
| createDate | Timestamp | The creation date. | 0.6 |
| lastOpDate | Timestamp | The last operation date. | 0.6 |
SDK Sample
Java SDK
QueryIpRangeAction action = new QueryIpRangeAction();
action.conditions = asList("uuid=d5764d7ab9174e5486e55ba805d28675");
action.sessionId = "5357e54aa55a4846ac96972776d3100f";
QueryIpRangeAction.Result res = action.call();Python SDK
QueryIpRangeAction action = QueryIpRangeAction()
action.conditions = ["uuid=2cda79a574344eeb9f38393253ddf858"]
action.sessionId = "c87d6755153549f6a4e7373b601ac99f"
QueryIpRangeAction.Result res = action.call()