Json API not enabled

Asked by arturo lorenzo

I am accessing via XML the restful API support on nova-api port 8774 successfully. I cannot access it via JSON, is there any parameter associated with the JSON API in nova.conf?
Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
arturo lorenzo
Solved:
Last query:
Last reply:
Revision history for this message
Dan Prince (dan-prince) said :
#1

Are you setting the content type of your requests?

Can you try setting this header: "Content-Type: application/json"?

Revision history for this message
arturo lorenzo (arturo-lorenzo) said :
#2

Dan,
that was the missing header, it is working, thanks!

Revision history for this message
Rajesh Mohan (mohan-rajesh00) said :
#3

Hi Arturo,

I'm struggling using nova-api server, too. Do mind I ask u some questions? (I'm totally new to OS and REST, please forgive me for some basic questions;-)

With nova-api, this is openstack api not Amazon EC2, right?
What the service URL look like? For example, if I want to list existing servers. Is it like https://0.0.0.0:8774/v1.1/servers?
For REST service, my understanding there is a paras in the request. paras include attributes. But nova-api has everything in the request body. How to issue such request? Could you show me a very simple client example?

Really appreciate your kind help!

Best,
Rajesh