Document navigation

GetVmSshKey

API Request

URLs
GET zstack/v1/vm-instances/{uuid}/ssh-keys
Headers
Authorization: OAuth the-session-uuid
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 9f358fd3fb0c451aa999d9fd5f21d675" \
-X GET http://localhost:8080/zstack/v1/vm-instances/905b14166587498982db9aa14aee50c1/ssh-keys
Parameter List
Name Type Location Description Allowed Values Starting Version
uuid String url Virtual Machine UUID 0.6
systemTags (Optional) List query System Tag 0.6
userTags (Optional) List query User Tag 0.6

API Response

Response Example
{
  "sshKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtgdrSt2i/4ayXoiR6qNd7dykOOcz205NVSUgw41GOZW3PdXa9WWMF1AP\
Htj8L2tYm3lKgIDSy1aQtpIEenu6L03BeqfPwepf2L89aZ/W4UPRpce9/bO4mSSJ6kvbZ7hFv+4KLUJCB9O7UrcFu7J/QwrkHNVNX1NsVUpq\
ebp3Ny8bxj0Wbr9ecqPKTclzygARRGz71iDQaEhLrQqy/Q8vr+/G1/uyAYfTnifCuuMTfh5DEsuKD1AEHMBVZEbJ4zupR4gywXnGRxHmEwE4\
64scACxeFWVx2flIXkTK8f3W0KBLCJ8VtTd8KxvKQBu2jJ70avmXNOzb5IaBDS root@172-20-12-46"
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 0.6
sshKey String Virtual Machine SSH Key 0.6
error ErrorCode Error code. If not null, the operation failed. This field is null when the operation is successful. For details, see error 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 cause. The source error that caused the current error. If there is no original error, this field is null 0.6

SDK Examples

Java SDK
GetVmSshKeyAction action = new GetVmSshKeyAction();
action.uuid = "71e1defb50aa42128605fc702cc00137";
action.sessionId = "2f3fe0048fc6485f9123541a1244411f";
GetVmSshKeyAction.Result res = action.call();
Python SDK
GetVmSshKeyAction action = GetVmSshKeyAction()
action.uuid = "c66da31c27004804b59f672002d4371c"
action.sessionId = "2b883a9c99e942f295beab6761ff8657"
GetVmSshKeyAction.Result res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center