Compaction settings using REST api

I want to do automation in couchbase installation and setting properties. Do we have REST API/CLI for setting up bucket level and at server level? i had able to see only CLI for server level.

can any one help me in this.

Hi, all our CLI tools are basically wrapper on top of our REST API. All you can do with one is doable with the other. The major differences between the two is that CLI call are usually synchronous and REST call asynchronous.

Compaction settings are documented here:

can you please give me a example for rest.

i had tried the below command but its not working . i am getting response status as 200 but no updating .

C:\Users>curl -v -u Administrator:Admin123 -X POST http://localhost:80
91/pools/default/buckets/data -d databaseFragmentationThreshold=20 -d databas
eFragmentationThreshold=30 -d viewFragmentationThreshold=20 -d viewFragmentation
Threshold=20 -d parallelDBAndViewCompaction=true -d allowedTimePeriod=true -d al
lowedTimePeriod=1 -d allowedTimePeriod=55 -d allowedTimePeriod=2 -d allowedTimeP
eriod=50 -d purgeInterval=1