List images details¶
Overview¶
Lists all details for available images.
Classification¶
- List
API Operation Object¶
- images
Synchronous / Asynchronous¶
- -
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/{tenant_id}/images/detail
HTTP Request Header¶
Format¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: <token_id>
Content-Type: application/json
HTTP Request Body¶
Format¶
- none
Request Parameter¶
name | style | format | description | required/optional |
---|---|---|---|---|
tenant_id | URI | UUID | The tenant ID in a multi-tenancy cloud. | required |
changes-since | Query | time/date |
|
optional |
server | Query | anyURI | Name of the server in URL format. | optional |
name | Query | String | Name of the image as a string. | optional |
status | Query | ImageStatus | Value of the status of the image so that you can filter on “ACTIVE” for example. | optional |
type | Query | String | Value of the type of image, such as snapshot or backup. | optional |
limit | Query | int | Requests a specified page size of returned items from the query. Returns a number of items up to the specified limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request. | optional |
marker | Query | String | Specifies the ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request. | optional |
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 “Content-Length”, “Date”
HTTP Response Body¶
Format¶
{
"images": [
{
"created": "<created>",
"id": "<id>",
"links": [
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>"
"type": "<type>"
}
],
"metadata": {
"architecture": "<architecture>",
"auto_disk_config": "<auto_disk_config>",
"kernel_id": "<kernel_id>",
"ramdisk_id": "<ramdisk_id>"
},
"minDisk": <minDisk>,
"minRam": <minRam>,
"name": "<name>",
"progress": <progress>,
"status": "<status>",
"updated": "<updated>"
},
{
"created": "<created>",
"id": "<id>",
"links": [
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>",
"type": "<type>"
}
],
"metadata": {
"architecture": "<architecture>",
"auto_disk_config": "<auto_disk_config>",
"kernel_id": "<kernel_id>",
"ramdisk_id": "<ramdisk_id>"
},
"minDisk": <minDisk>,
"minRam": <minRam>,
"name": "<name>",
"progress": <progress>,
"status": "<status>",
"updated": "<updated>"
},
{
"created": "<created>",
"id": "<id>",
"links": [
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>",
"type": "<type>"
}
],
"metadata": {
"architecture": "<architecture>",
"auto_disk_config": "<auto_disk_config>",
"kernel_id": "<kernel_id>",
"ramdisk_id": "<ramdisk_id>"
},
"minDisk": <minDisk>,
"minRam": <minRam>,
"name": "<name>",
"progress": <progress>,
"status": "<status>",
"updated": "<updated>"
},
{
"created": "<created>",
"id": "<id>",
"links": [
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>",
"type": "<type>"
}
],
"metadata": {
"architecture": "<architecture>",
"auto_disk_config": "<auto_disk_config>",
"kernel_id": "<kernel_id>",
"ramdisk_id": "<ramdisk_id>"
},
"minDisk": <minDisk>,
"minRam": <minRam>,
"name": "<name>",
"progress": <progress>,
"status": "<status>",
"updated": "<updated>"
},
{
"created": "<created>",
"id": "<id>",
"links": [
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>",
"type": "<type>"
}
],
"metadata": {
"architecture": "<architecture>",
"auto_disk_config": "<auto_disk_config>",
"kernel_id": "<kernel_id>",
"ramdisk_id": "<ramdisk_id>"
},
"minDisk": <minDisk>,
"minRam": <minRam>,
"name": "<name>",
"progress": <progress>,
"status": "<status>",
"updated": "<updated>"
},
{
"created": "<created>",
"id": "<id>",
"links": [
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>",
"type": "<type>"
}
],
"metadata": {
"architecture": "<architecture>",
"auto_disk_config": "<auto_disk_config>",
"kernel_id": "<kernel_id>",
"ramdisk_id": "<ramdisk_id>"
},
"minDisk": <minDisk>,
"minRam": <minRam>,
"name": "<name>",
"progress": <progress>,
"status": "<status>",
"updated": "<updated>"
},
{
"created": "<created>",
"id": "<id>",
"links": [
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>"
},
{
"href": "<href>",
"rel": "<rel>",
"type": "<type>"
}
],
"metadata": {
"architecture": "<architecture>",
"auto_disk_config": "<auto_disk_config>",
"kernel_id": "<kernel_id>",
"ramdisk_id": "<ramdisk_id>"
},
"minDisk": <minDisk>,
"minRam": <minRam>,
"name": "<name>",
"progress": <progress>,
"status": "<status>",
"updated": "<updated>"
}
]
}
Response Parameter¶
item | format | description |
---|---|---|
X-Compute-Request-ID (Optional) | String | Returns a unique identifier to provide tracking for the request. The request ID that is associated with the request appears in the log lines for that request. By default, the middleware configuration ensures that the request ID appears in the log files. |
next (Optional) | anyURI | Moves to the next metadata item. |
previous (Optional) | anyURI | Moves to the previous metadata item. |
created | time/date | created time of image |
id | UUID | image id |
architecture | String | The architecture of the metadata |
auto_disk_config | boolean |
|
kernel_id | String | kernel id |
ramdisk_id | String | ramdisk id |
minDisk | int | Integer value for the minimum disk space in GB so you can filter results. |
minRam | int | Integer value for the minimum RAM so you can filter results. |
name | String | name of the image |
progress | int | boot progress for imege |
status | String | Value of the status of the image so that you can filter on “ACTIVE” for example. |
updated | time/date | update time |
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/{tenant_id}/images/detail
Request Header¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Content-Type: application/json
Request Body¶
- none
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 “Content-Length”, “Date”
Response Body¶
{
"images": [
{
"created": "2011-01-01T01:02:03Z",
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
"links": [
{
"href": "http://openstack.example.com/v2/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "bookmark"
},
{
"href": "http://glance.openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"metadata": {
"architecture": "x86_64",
"auto_disk_config": "True",
"kernel_id": "nokernel",
"ramdisk_id": "nokernel"
},
"minDisk": 0,
"minRam": 0,
"name": "fakeimage7",
"progress": 100,
"status": "ACTIVE",
"updated": "2011-01-01T01:02:03Z"
},
{
"created": "2011-01-01T01:02:03Z",
"id": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
"links": [
{
"href": "http://openstack.example.com/v2/openstack/images/155d900f-4e14-4e4c-a73d-069cbf4541e6",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/images/155d900f-4e14-4e4c-a73d-069cbf4541e6",
"rel": "bookmark"
},
{
"href": "http://glance.openstack.example.com/openstack/images/155d900f-4e14-4e4c-a73d-069cbf4541e6",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"metadata": {
"architecture": "x86_64",
"kernel_id": "nokernel",
"ramdisk_id": "nokernel"
},
"minDisk": 0,
"minRam": 0,
"name": "fakeimage123456",
"progress": 100,
"status": "ACTIVE",
"updated": "2011-01-01T01:02:03Z"
},
{
"created": "2011-01-01T01:02:03Z",
"id": "a2459075-d96c-40d5-893e-577ff92e721c",
"links": [
{
"href": "http://openstack.example.com/v2/openstack/images/a2459075-d96c-40d5-893e-577ff92e721c",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/images/a2459075-d96c-40d5-893e-577ff92e721c",
"rel": "bookmark"
},
{
"href": "http://glance.openstack.example.com/openstack/images/a2459075-d96c-40d5-893e-577ff92e721c",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"metadata": {
"kernel_id": "nokernel",
"ramdisk_id": "nokernel"
},
"minDisk": 0,
"minRam": 0,
"name": "fakeimage123456",
"progress": 100,
"status": "ACTIVE",
"updated": "2011-01-01T01:02:03Z"
},
{
"created": "2011-01-01T01:02:03Z",
"id": "a440c04b-79fa-479c-bed1-0b816eaec379",
"links": [
{
"href": "http://openstack.example.com/v2/openstack/images/a440c04b-79fa-479c-bed1-0b816eaec379",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/images/a440c04b-79fa-479c-bed1-0b816eaec379",
"rel": "bookmark"
},
{
"href": "http://glance.openstack.example.com/openstack/images/a440c04b-79fa-479c-bed1-0b816eaec379",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"metadata": {
"architecture": "x86_64",
"auto_disk_config": "False",
"kernel_id": "nokernel",
"ramdisk_id": "nokernel"
},
"minDisk": 0,
"minRam": 0,
"name": "fakeimage6",
"progress": 100,
"status": "ACTIVE",
"updated": "2011-01-01T01:02:03Z"
},
{
"created": "2011-01-01T01:02:03Z",
"id": "c905cedb-7281-47e4-8a62-f26bc5fc4c77",
"links": [
{
"href": "http://openstack.example.com/v2/openstack/images/c905cedb-7281-47e4-8a62-f26bc5fc4c77",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/images/c905cedb-7281-47e4-8a62-f26bc5fc4c77",
"rel": "bookmark"
},
{
"href": "http://glance.openstack.example.com/openstack/images/c905cedb-7281-47e4-8a62-f26bc5fc4c77",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"metadata": {
"kernel_id": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
"ramdisk_id": null
},
"minDisk": 0,
"minRam": 0,
"name": "fakeimage123456",
"progress": 100,
"status": "ACTIVE",
"updated": "2011-01-01T01:02:03Z"
},
{
"created": "2011-01-01T01:02:03Z",
"id": "cedef40a-ed67-4d10-800e-17455edce175",
"links": [
{
"href": "http://openstack.example.com/v2/openstack/images/cedef40a-ed67-4d10-800e-17455edce175",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/images/cedef40a-ed67-4d10-800e-17455edce175",
"rel": "bookmark"
},
{
"href": "http://glance.openstack.example.com/openstack/images/cedef40a-ed67-4d10-800e-17455edce175",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"metadata": {
"kernel_id": "nokernel",
"ramdisk_id": "nokernel"
},
"minDisk": 0,
"minRam": 0,
"name": "fakeimage123456",
"progress": 100,
"status": "ACTIVE",
"updated": "2011-01-01T01:02:03Z"
},
{
"created": "2011-01-01T01:02:03Z",
"id": "76fa36fc-c930-4bf3-8c8a-ea2a2420deb6",
"links": [
{
"href": "http://openstack.example.com/v2/openstack/images/76fa36fc-c930-4bf3-8c8a-ea2a2420deb6",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/images/76fa36fc-c930-4bf3-8c8a-ea2a2420deb6",
"rel": "bookmark"
},
{
"href": "http://glance.openstack.example.com/openstack/images/76fa36fc-c930-4bf3-8c8a-ea2a2420deb6",
"rel": "alternate",
"type": "application/vnd.openstack.image"
}
],
"metadata": {
"kernel_id": "nokernel",
"ramdisk_id": "nokernel"
},
"minDisk": 0,
"minRam": 0,
"name": "fakeimage123456",
"progress": 100,
"status": "ACTIVE",
"updated": "2011-01-01T01:02:03Z"
}
]
}
Execution Example¶
HTTP Request¶
GET /v2/f66f8e846a65484a9a6740077e72e3dd/images/detail HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: eb46ce9e8a204cbabacc51282ac691ad
Accept: application/json
HTTP Response¶
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3062
X-Compute-Request-Id: req-74a7f965-7cbe-49af-8e8f-e433e4b2cdb0
Date: Wed, 07 Oct 2015 06:03:27 GMT
{"images": [{"status": "ACTIVE", "updated": "2015-09-18T05:37:30Z", "links": [{"href": "https://ot5-nova.cloudntest.info:8774/v2/db92a0fc69cb499b8175c04dd3b66686/images/d8fa0a65-2dd7-4eb4-b38d-1bb078809ea1", "rel": "self"}, {"href": "https://ot5-nova.cloudntest.info:8774/db92a0fc69cb499b8175c04dd3b66686/images/d8fa0a65-2dd7-4eb4-b38d-1bb078809ea1", "rel": "bookmark"}, {"href": "https://ot5-glance.cloudntest.info:9292/db92a0fc69cb499b8175c04dd3b66686/images/d8fa0a65-2dd7-4eb4-b38d-1bb078809ea1", "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": "d8fa0a65-2dd7-4eb4-b38d-1bb078809ea1", "OS-EXT-IMG-SIZE:size": 258080768, "name": "scenario-qcow2-2059721347", "created": "2015-09-18T05:37:20Z", "minDisk": 0, "progress": 100, "minRam": 0, "metadata": {"label": "UpdatedImage"}}, {"status": "ACTIVE", "updated": "2015-09-17T06:53:41Z", "links": [{"href": "https://ot5-nova.cloudntest.info:8774/v2/db92a0fc69cb499b8175c04dd3b66686/images/f749e5ba-1bae-4f74-88b5-fd06c8681a66", "rel": "self"}, {"href": "https://ot5-nova.cloudntest.info:8774/db92a0fc69cb499b8175c04dd3b66686/images/f749e5ba-1bae-4f74-88b5-fd06c8681a66", "rel": "bookmark"}, {"href": "https://ot5-glance.cloudntest.info:9292/db92a0fc69cb499b8175c04dd3b66686/images/f749e5ba-1bae-4f74-88b5-fd06c8681a66", "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": "f749e5ba-1bae-4f74-88b5-fd06c8681a66", "OS-EXT-IMG-SIZE:size": 258080768, "name": "ubuntu_server_14_04-cloudimg-amd64.img", "created": "2015-09-17T06:38:35Z", "minDisk": 0, "progress": 100, "minRam": 0, "metadata": {"protect": "false"}}]}
Error Execution Example¶
HTTP Request¶
GET /v2/f66f8e846a65484a9a6740077e2e3dd/images/detail HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: eb46ce9e8a204cbabacc51282ac691ad
Accept: application/json
HTTP Response¶
HTTP/1.1 400 Bad Request
Content-Length: 187
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-24982e0d-4fbd-44ee-8f91-6313ff2f73ae
Date: Wed, 07 Oct 2015 06:05:04 GMT
{"badRequest": {"message": "Malformed request URL: URL's project_id 'd66f8e846a65484a9a6740077e72e3dd' doesn't match Context's project_id 'f66f8e846a65484a9a6740077e72e3dd'", "code": 400}}