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

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.

主站蜘蛛池模板: 大余县| 海淀区| 绥滨县| 吴江市| 洪泽县| 崇文区| 濮阳市| 平邑县| 响水县| 浪卡子县| 涪陵区| 高安市| 沙湾县| 屏山县| 明光市| 宁晋县| 洛川县| 瑞金市| 赤城县| 珠海市| 兴隆县| 都安| 淮阳县| 曲水县| 固安县| 读书| 西峡县| 东城区| 宿迁市| 灵宝市| 祁东县| 广汉市| 阿瓦提县| 福清市| 内乡县| 临清市| 读书| 格尔木市| 绥化市| 科技| 固原市|