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

  • Learning Couchbase
  • Henry Potsangbam
  • 163字
  • 2021-07-30 10:25:03

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.

主站蜘蛛池模板: 灵台县| 鹤岗市| 南郑县| 大安市| 玉龙| 唐海县| 西充县| 商水县| 安仁县| 西华县| 麟游县| 宜都市| 丹阳市| 广南县| 资溪县| 德令哈市| 尼木县| 北安市| 五华县| 噶尔县| 马公市| 曲阜市| 乡宁县| 景洪市| 太保市| 海安县| 泰来县| 石门县| 白沙| 宁夏| 阿城市| 高阳县| 靖江市| 开原市| 开化县| 商水县| 改则县| 吴堡县| 白城市| 富民县| 衡南县|