2013-02-11 96 views
1

我需要REST API for zookeeper,我指的是https://github.com/Netflix/exhibitor/wiki/REST-Configuration,但我只是無法執行POST API。如何執行Netflix-Exhibitor POST REST API?

我在哪裏可以得到使用參展商的示例捲曲請求。或者有人可以發佈一個例子來設置配置。 curl查詢如下,它需要config作爲參數。

curl -i -X POST "http://hostname:8080/exhibitor/v1/config/set 

那麼最終的curl請求將如何作爲參數的任何配置。所以基本上我只是無法添加參數。

回答

1

我想通了。 :)

curl -i -X POST 「http://hostname:8080/exhibitor/v1/config/set」 -d '{"rollInProgress":false,"rollStatus":"n/a","rollPercentDone":0,"hostname":"hostname.com","serverId":-1,"logIndexDirectory":"","zookeeperInstallDirectory":"","zookeeperDataDirectory":"","zookeeperLogDirectory":"","serversSpec":"","backupExtra":"","zooCfgExtra":{},"javaEnvironment":"","log4jProperties":"","clientPort":0,"connectPort":0,"electionPort":0,"checkMs":0,"cleanupPeriodMs":0,"cleanupMaxFiles":10,"backupMaxStoreMs":0,"backupPeriodMs":0,"autoManageInstances":0,"autoManageInstancesSettlingPeriodMs":0,"observerThreshold":0,"controlPanel":{}}' 

您必須提供整個配置。並改變你想改變的財產的價值。