What is the REST API CURL command to get a list of available images? (2018)
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"}
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.