官术网_书友最值得收藏!

Couchbase administrative REST API

Another way to administrate Couchbase clusters is by using the REST API. It provides all the features we have discussed in the web console. In fact, the REST API is being used behind the scenes for most of the options displayed in the web console. You can perform all administrative functionalities using the REST API too.

You need some REST API tools to use this feature. In our case, we will use curl. It can be downloaded and installed from http://curl.haxx.se/download.html.

We will see an example as follows. You can refer the Couchbase documentation for comprehensive details on the REST API usages and syntax:

curl -u Administrator:root123 http://localhost:8091/pools/default

This command provides cluster details in a JSON document.

The REST API output

You can get information about a specific bucket that is LearningCouchbase using the following command:

curl -u Administrator:root123 http://localhost:8091/pools/default/buckets/LearningCouchbase

You need to pass the user ID and password credentials to connect to the cluster using the -u parameter.

主站蜘蛛池模板: 武平县| 晋州市| 水城县| 乐都县| 晋中市| 孟连| 茶陵县| 德安县| 建平县| 龙里县| 永顺县| 梧州市| 呼和浩特市| 大港区| 五大连池市| 奇台县| 紫金县| 崇礼县| 临清市| 曲靖市| 大石桥市| 黎川县| 海宁市| 阜城县| 平乐县| 鸡泽县| 铜陵市| 宁阳县| 茶陵县| 鹤山市| 砀山县| 长泰县| 习水县| 彝良县| 沙雅县| 廊坊市| 德钦县| 都匀市| 白沙| 读书| 桦甸市|