What is the REST API CURL command to get a list of available images? (2018)

asked 2018-07-31 15:59:18 -0500

zetret12 gravatar image

updated 2018-07-31 17:13:54 -0500

I am using the following with my token exported, and still nothing is returned. However 2 images are available in the environment (openstack image list).

curl -s -k -X GET "http://localhost:9292/v2/images" \ -H "X-Auth-Token:$TOKEN" \ -H "Accept: application/json" \ -H "Content-Type: application/json"

Please help! Nothing is returned. This is the output I get: {"images": [], "schema": "/v2/schemas/images", "first": "/v2/images"}

edit retag flag offensive close merge delete


It works on my Newton-based Packstack (I only replaced localhost with my IP address).

Are you sure the TOKEN is correct?

When you run openstack --debug image list, you see the APIs issued to Glance and the responses. Perhaps your cloud requires different API parameters.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-31 19:00:10 -0500 )edit