Document navigation

GetPrimaryStorageCandidatesForVolumeMigration

API Request

URLs
GET zstack/v1/primary-storage/volumes/{volumeUuid}/migration-candidates
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 39b0ace2ecc0459c929c8e352ea906f2" \
-X GET http://localhost:8080/zstack/v1/primary-storage/volumes/073f14f2d6dc437b8114faa4223f0ce8/migration-candidates
Request Parameters
Name Type Location Description Optional Value Starting Version
volumeUuid String url The volume UUID. 2.2
systemTags List query Optional. The system tags. 2.2
userTags List query Optional. The user tags. 2.2

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "64776c6c7dfd46b091ec387d21b5adb0",
      "name": "PS-1"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 2.2
inventories List See inventories. 2.2
#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. 2.2
description String The detailed description of the error. 2.2
details String The details about the error. 2.2
elaboration String The reserved field. Default value: null. 2.2
opaque LinkedHashMap The reserved field. Default value: null. 2.2
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 2.2
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 2.2
zoneUuid String The zone UUID. 2.2
name String The resource name. 2.2
url String The URL. 2.2
description String Optional. The detailed description of the resource. 2.2
totalCapacity Long The total capacity. 2.2
availableCapacity Long The available capacity. 2.2
totalPhysicalCapacity Long The total physical capacity. 2.2
availablePhysicalCapacity Long The available physical capacity. 2.2
systemUsedCapacity Long The system used capacity. 2.2
type String The resource type. 2.2
state String The resource state. 2.2
status String The resource status. 2.2
mountPath String The mount path. 2.2
createDate Timestamp The creation date. 2.2
lastOpDate Timestamp The last operation date. 2.2
attachedClusterUuids List The attached cluster UUIDs. 2.2

SDK Sample

Java SDK
GetPrimaryStorageCandidatesForVolumeMigrationAction action = new GetPrimaryStorageCandidatesForVolumeMigrationAction();
action.volumeUuid = "06b0f7d7098349b5ba336013aea319f5";
action.sessionId = "5869e8a6986b40c8be1ac3a520a6a9a1";
GetPrimaryStorageCandidatesForVolumeMigrationAction.Result res = action.call();
Python SDK
action = GetPrimaryStorageCandidatesForVolumeMigrationAction()
action.volumeUuid = "8800d0ffad8f42d7911347ca0af8e224"
action.sessionId = "a1b986a4bb5b409ba84951d3a3c1ed54"
res = action.call()
API Reference | 5.5.38 | ZStack Cloud · ZCF | ZStack Resource Center