cjmamo / kafka-web-console

A web console for Apache Kafka (retired)
Apache License 2.0
762 stars 246 forks source link

API or command-line method for registering zookeeper #24

Closed jpotter closed 10 years ago

jpotter commented 10 years ago

Is there a way to register zookeeper programmatically? Either by including the settings in a conf file or including them on the command line?

Thanks for what looks to be a great tool!

cjmamo commented 10 years ago

Yes, you can use the console's JSON API. An API console was added in the latest snapshot which you can use to test it (http://[hostname]:[port]/api/console).

jpotter commented 10 years ago

Hi Claude,

Hmm, I'm getting 404 issues with this. Reading through the RAML, I'm able to get settings via: http://localhost:8088/api/settings.json (not http://localhost:8088/api/console/settings.json) but not able to PUT to http://localhost:8088/api/zookeepers.json (404 not found), nor able to get http://localhost:8088/api/zookeepers.json/all -- suggestions? (I tried a number of variations.)

Thanks, Jeff

(This is from the current head of the project -- I'm having other problems getting it to list any brokers or topics, although I see them listed in zookeeper and kafka.)

cjmamo commented 10 years ago

Jeff, the JSON API is accessed using http://localhost:8088/settings.json, http://localhost:8088/zookeepers.json and so on; not http://localhost:8088/api/zookeepers.json. The URL http://localhost:8088/api/console is used to access the API console and play around with the JSON api.