QueryShareableVolumeVmInstanceRef

API Request

URLs

GET zstack/v1/volumes/vm-instances/refs
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 9f5a9540d63e4ade922c141078b95af9" \
-X GET http://localhost:8080/zstack/v1/volumes/vm-instances/refs?q=0c917562d5954544b37bf5e0ed0735a6&q=cddc1c17e94a43b5b50e1df53e076d11&q=2&q=Jan 22, 2017 2:41:37 PM&q=Jan 22, 2017 2:43:18 PM

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryShareableVolumeVmInstanceRef, and pressing the Tab key.

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
QueryShareableVolumeVmInstanceRefAction action = new QueryShareableVolumeVmInstanceRefAction();
action.conditions = asList("0c917562d5954544b37bf5e0ed0735a6","cddc1c17e94a43b5b50e1df53e076d11","2","Jan 22, 2017 2:41:37 PM","Jan 22, 2017 2:43:18 PM");
action.sessionId = "9fa1cf123ab04b1691ea509bf48c9071";
QueryShareableVolumeVmInstanceRefAction.Result res = action.call();
Python SDK
QueryShareableVolumeVmInstanceRefAction action = QueryShareableVolumeVmInstanceRefAction()
action.conditions = ["0c917562d5954544b37bf5e0ed0735a6","cddc1c17e94a43b5b50e1df53e076d11","2","Jan 22, 2017 2:41:37 PM","Jan 22, 2017 2:43:18 PM"]
action.sessionId = "730ddea9ae3246a0ad483f7b6e3bb49f"
QueryShareableVolumeVmInstanceRefAction.Result res = action.call()