Ask Your Question
0

Json API not enabled

asked 2011-05-31 15:00:35 -0500

arturo-lorenzo gravatar image

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!

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2011-06-07 19:53:53 -0500

mohan-rajesh00 gravatar image

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 (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

edit flag offensive delete link more
0

answered 2011-05-31 20:23:04 -0500

arturo-lorenzo gravatar image

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

edit flag offensive delete link more
0

answered 2011-05-31 15:04:17 -0500

Are you setting the content type of your requests?

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-05-31 15:00:35 -0500

Seen: 16 times

Last updated: Jun 07 '11