LocalStorageGetVolumeMigratableHosts
API Request
URLs
GET zstack/v1/volumes/{volumeUuid}/migration-target-hosts
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 47c467d5c9944985bfbfead8d44cfec2" \
-X GET http://localhost:8080/zstack/v1/volumes/ef7fe562459146d6bb13078821d451a8/migration-target-hosts?
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
volumeUuid | String | url | The volume UUID. | 0.6 | |
systemTags | List | query | Optional. The system tags. | 0.6 | |
userTags | List | query | Optional. The user tags. | 0.6 |
API Response
When the API succeeded, an empty JSON structure
{}
is returned. When
the API failed, the returned JSON structure includes an error field. For
example,{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
SDK Sample
Java
SDK
LocalStorageGetVolumeMigratableHostsAction action = new LocalStorageGetVolumeMigratableHostsAction();
action.volumeUuid = "dd15184d915c422686da18415b194ce9";
action.sessionId = "1ce8dcd82213420ba5aea5c488834eba";
LocalStorageGetVolumeMigratableHostsAction.Result res = action.call();
Python
SDK
LocalStorageGetVolumeMigratableHostsAction action = LocalStorageGetVolumeMigratableHostsAction()
action.volumeUuid = "19a3d12dc45540f997ac0c6ad0cfb8d7"
action.sessionId = "e6d54fe5d8424c45b723f65a1136d23e"
LocalStorageGetVolumeMigratableHostsAction.Result res = action.call()