Description
Store the VM of the specified server ID as an image.
(Snapshot)
The VM is needed to be stopped.
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 | |
| name (Required) | Snapshot Name | plain | |
| createImage | plain |
Request Json
{
"createImage": {
"name": "example_snap01"
}
}
Normal response codes
202 Accepted
Example
curl -i -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: 35941e7df872405d84e5b026dba8323c" \
-d '{"createImage": {"name": "example_snap01"}}' \
https://compute.tyo1.cloud.z.com/v2/1864e71d2deb46f6b47526b69c65a45d/servers/e25b3611-96df-4514-a54b-7729aec48dc1/actionHTTP/1.1 202 Accepted Date: Wed, 14 Jan 2015 05:12:43 GMT Server: Apache Content-Length: 0 Content-Type: application/json