Update bootable status of a volume¶
Overview¶
Update bootable status of a volume.
Classification¶
- Update
API Operation Object¶
- action
Synchronous / Asynchronous¶
- -
Request¶
HTTP Request Method¶
- POST
HTTP Request Path¶
{api_endpoint}/v2/{tenant_id}/volumes/{volume_id}/action
HTTP Request Header¶
Format¶
Accept-Encoding: gzip, deflate, compress(optional)
Accept: application/json
X-Auth-Token: <token_id>
Content-Type: application/json
Response¶
HTTP Response Header¶
Format¶
HTTP/1.1 <response code> <message> (ex. 200 OK)
<response_code>: see “HTTP Responses” section
<message>: message based on the response code
- skip auto insert field such as “X-Compute-Request-Id” and “X-Openstack-Request-Id”, “Content-Length”, “Date”
Response Code¶
response code | condition |
---|---|
200 | normal end |
* | Follow a Common Error Code |
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/{tenant_id}/volumes/{volume_id}/action
Request Header¶
Accept-Encoding: gzip, deflate, compress(optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Content-Type: application/json
Request Body¶
{
"os-set_bootable": {
"bootable": "true"
}
}
Sample API Response¶
Response Header¶
HTTP/1.1 200 OK
<response_code>: see “HTTP Responses” section
<message>: message based on the response code
- skip auto insert field such as “X-Compute-Request-Id” and “X-Openstack-Request-Id”, “Content-Length”, “Date”
Response Body¶
- none
Execution Example¶
HTTP Request¶
POST /v2/cb8aa2a2c7244af5aab1fa7881ba7f4c/volumes/185ed90d-f2a9-484e-b6ac-5a0dbab3be13/action HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8776
X-Auth-Token: 550cdc4f8e3a42aaa7afb359a0e3b1bf
Content-type: application/json
Accept: application/json
Content-Length: 41
{"os-set_bootable": {"bootable": "true"}}
HTTP Response¶
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 0
X-Openstack-Request-Id: req-4d0636b6-2c88-4da2-a78f-357ef26a370f
Date: Thu, 15 Oct 2015 14:23:34 GMT
Error Execution Example¶
HTTP Request¶
POST /v2/cb8aa2a2c7244af5aab1fa7881ba7f4/volumes/185ed90d-f2a9-484e-b6ac-5a0dbab3be13/action HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8776
X-Auth-Token: 550cdc4f8e3a42aaa7afb359a0e3b1bf
Content-type: application/json
Accept: application/json
Content-Length: 41
{"os-set_bootable": {"bootable": "true"}}
HTTP Response¶
HTTP/1.1 400 Bad Request
Content-Length: 65
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-b80e715d-1263-44e0-a084-ba3581724c38
X-Openstack-Request-Id: req-b80e715d-1263-44e0-a084-ba3581724c38
{"badRequest": {"message": "Malformed request url", "code": 400}}