我需要为zookeeper提供REST API,我指的是https://github.com/Netflix/exhibitor/wiki/REST-Configuration,但我无法执行POST API。
我在哪里可以使用参展商获得示例卷曲请求。或者有人可以发布一个示例来设置配置。 curl查询如下,它需要config作为参数。
curl -i -X POST "http://hostname:8080/exhibitor/v1/config/set
那么如何将任何配置作为参数的最终curl请求。所以基本上我只是无法添加参数。
答案 0 :(得分: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":{}}'
您必须提供整个配置。并更改您想要更改的属性的值。