Description
About root password for VM
Request URL
Compute API v2.0
POST /v2/{tenant_id}/servers/{server_id}/action
Request Paramters
| Parameter | Value | Style | Description |
|---|---|---|---|
| X-Auth-Token | User Token | header | |
| tenant_id | URI | ||
| server_id | Server ID | URI | |
| imageRef | image id | plain | |
| adminPass (Optional) | plain | For details of root password for VM, refer to "About root password for VM ". | |
| key_name (Optional) | ssh key name | plain | Specify when you use SSH key. |
Request Json
{
"rebuild": {
"imageRef": "fcf90f5a-1fcb-4ec0-8114-39aafd4e9e4b",
"adminPass": "mt1293sxgdS",
"key_name": "xxxxxx-key-01"
}
}
Normal response codes
202
Example
curl -i -X POST \
-H "Accept: application/json" \
-H "X-Auth-Token: 35941e7df872405d84e5b026dba8323c" \
-d '{"rebuild": {"imageRef": "fb1d084f-357f-40e2-a2c3-59b8ecc1f6f2", "adminPass":"72LY2hf38Kf84vCy4,Ur"}}' \
https://compute.tyo1.cloud.z.com/v2/1864e71d2deb46f6b47526b69c65a45d/servers/e25b3611-96df-4514-a54b-7729aec48dc1/action
HTTP/1.1 202 Accepted
Date: Tue, 09 Dec 2014 10:02:58 GMT
Server: Apache
Content-Length: 1385
Content-Type: text/html; charset=UTF-8
{
"server": {
"OS-DCF:diskConfig": "MANUAL",
"accessIPv4": "",
"accessIPv6": "",
"addresses": {
"ext-133-130-48-0-xx": [
{
"addr": "133.130.49.xxx",
"version": 4
},
{
"addr": "2400:8500:1301:727:133:130:49:xxxx",
"version": 6
}
]
},
"adminPass": "72LY2hf38Kf84vCy4,Ur",
"created": "2015-05-08T01:00:41Z",
"flavor": {
"id": "7eea7469-0d85-4f82-8050-6ae742394681",
"links": [
{
"href": "https://compute.tyo1.cloud.z.com/1864e71d2deb46f6b47526b69c65a45d/flavors/7eea7469-0d85-4f82-8050-6ae742394681",
"rel": "bookmark"
}
]
},
"hostId": "1b21cb1fa28badef69e02b6a2e71909dbf62a982e65892fad8ad01cf",
"id": "e25b3611-96df-4514-a54b-7729aec48dc1",
"image": {
"id": "fb1d084f-357f-40e2-a2c3-59b8ecc1f6f2",
"links": [
{
"href": "https://compute.tyo1.cloud.z.com/1864e71d2deb46f6b47526b69c65a45d/images/fb1d084f-357f-40e2-a2c3-59b8ecc1f6f2",
"rel": "bookmark"
}
]
},
"links": [
{
"href": "https://compute.tyo1.cloud.z.com/v2/1864e71d2deb46f6b47526b69c65a45d/servers/e25b3611-96df-4514-a54b-7729aec48dc1",
"rel": "self"
},
{
"href": "https://compute.tyo1.cloud.z.com/1864e71d2deb46f6b47526b69c65a45d/servers/e25b3611-96df-4514-a54b-7729aec48dc1",
"rel": "bookmark"
}
],
"metadata": {
"backup_id": "",
"backup_set": "0",
"backup_status": "active",
"instance_name_tag": "vps-2015-05-08-09-59",
"properties": "{\"vnc_keymap\":\"ja\",\"hw_video_model\":\"vga\",\"hw_vif_model\":\"virtio\",\"hw_disk_bus\":\"virtio\",\"cdrom_path\":\"\"}"
},
"name": "server1",
"status": "SHUTOFF",
"tenant_id": "1864e71d2deb46f6b47526b69c65a45d",
"updated": "2015-05-08T06:56:45Z",
"user_id": "068ae7141b3a4e15bebb8b9ca177e9d3"
}
}