Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

curl 404 Error The resource could not be found

Hi all, I'm trying to list some info API style :) and what i have done till now is the following: Using "curl" i can get the token out, with the token i can list the tenants, but after that i can't list the servers and other information. From the conductore if i execute the "nova --debug list --all-tenants" i get the results and get the commands that are executed with curl. So when im trying this from outside i get an error "404" The resource could not be found.

curl -i 'http://x.x.x.x:8774/v2/tenants/' -X GET -H "X-Auth-Token: <Token_ID>" -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json"

And with the following command i don't get errors but i get some strange results:

curl -i 'http://x.x.x.x:8774/v2.0/<Tenant_ID>/servers' -X ET -H "X-Auth-Token: <Token_ID>" -H "X-Auth-Project-Id: <Tenant_ID>" -H "User-Agent: python-novaclient" -H "Accept: application/json"

and the output is:

HTTP/1.1 300 Multiple Choices Content-Type: application/json Content-Length: 357 Date: Sun, 03 Apr 2016 21:59:48 GMT Connection: close

{"choices": [{"status": "CURRENT", "media-types": [{"base": "application/xml", "type": "application/vnd.openstack.compute+xml;version=2"}, {"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0", "links": [{"href": "http://x.x.x.x:8774/v2/v2.0/<tenant_id>/servers", "rel": "self"}]}]}

So my question is what is wrong here, i get output for tokens and listing tenants but i can't get output for listing servers ??

Thanks in advanced !

curl 404 Error The resource could not be found

Hi all, I'm trying to list some info API style :) and what i have done till now is the following: Using "curl" i can get the token out, with the token i can list the tenants, but after that i can't list the servers and other information. From the conductore if i execute the "nova --debug list --all-tenants" i get the results and get the commands that are executed with curl. So when im trying this from outside i get an error "404" The resource could not be found.

curl -i 'http://x.x.x.x:8774/v2/tenants/' -X GET -H "X-Auth-Token: <Token_ID>" -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json"

And with the following command i don't get errors but i get some strange results:

curl -i 'http://x.x.x.x:8774/v2.0/<Tenant_ID>/servers' -X ET -H "X-Auth-Token: <Token_ID>" -H "X-Auth-Project-Id: <Tenant_ID>" -H "User-Agent: python-novaclient" -H "Accept: application/json"

and the output is:

HTTP/1.1 300 Multiple Choices
 Content-Type: application/json
 Content-Length: 357 Date: Sun, 03 Apr
 2016 21:59:48 GMT Connection: close

close {"choices": [{"status": "CURRENT", "media-types": [{"base": "application/xml", "type": "application/vnd.openstack.compute+xml;version=2"}, {"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0", "links": [{"href": "http://x.x.x.x:8774/v2/v2.0/<tenant_id>/servers", "http://x.x.x.x:8774/v2/v2.0/<Tenant_ID>/servers", "rel": "self"}]}]}

"self"}]}]}

So my question is what is wrong here, i get output for tokens and listing tenants but i can't get output for listing servers ??

Thanks in advanced !