Network Services
QueryNetworkServiceProvider
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 0305524eb18344ea95193f8283a7212f" \
-X GET http://localhost:8080/zstack/v1/network-services/providersQueryable Fields
Run the CLI tool, type QueryNetworkServiceProvider and press the Tab key to view all queryable fields and cross-table queryable resource names.
API Response
Response Example
{
"inventories": [
{
"uuid": "3cf04a2c5e1a4c4c8947545323e35d6a",
"name": "SecurityGroup",
"type": "SecurityGroup",
"createDate": "Jun 7, 2017 9:21:03 PM",
"lastOpDate": "Jun 7, 2017 9:21:03 PM",
"networkServiceTypes": [
"SecurityGroup"
],
"attachedL2NetworkUuids": []
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. Seeerror for details. | 0.6 |
| inventories | List | Seeinventories for details. | 0.6 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root error: the source error that caused the current error. If there is no original error, this field is null | 0.6 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the resource, uniquely identifying the resource | 0.6 |
| name | String | The resource name | 0.6 |
| description | String | The detailed description of the resource | 0.6 |
| type | String | 0.6 | |
| createDate | Timestamp | The creation time | 0.6 |
| lastOpDate | Timestamp | The last modification time | 0.6 |
| networkServiceTypes | Set | 0.6 | |
| attachedL2NetworkUuids | Set | 0.6 |
SDK Examples
Java SDK
QueryNetworkServiceProviderAction action = new QueryNetworkServiceProviderAction();
action.conditions = asList();
action.sessionId = "3d4bfef1a32241528160058368824670";
QueryNetworkServiceProviderAction.Result res = action.call();Python SDK
QueryNetworkServiceProviderAction action = QueryNetworkServiceProviderAction()
action.conditions = []
action.sessionId = "db50128c5ab745e68c9b30c52d24ebf9"
QueryNetworkServiceProviderAction.Result res = action.call()