Node Configuration

      +

      Node Configuration

      GET /api/cfg

      Returns the node’s current view of the cluster’s configuration as JSON.

      Permission Required: cluster.settings!read

      Role Required: Full-Admin, Cluster-Admin

      Sample response
      {
          "indexDefs": {
              "implVersion": "4.0.0",
              "indexDefs": {
                  "myFirstIndex": {
                      "name": "myFirstIndex",
                      "params": "",
                      "planParams": {
                          "hierarchyRules": null,
                          "maxPartitionsPerPIndex": 0,
                          "nodePlanParams": null,
                          "numReplicas": 0,
                          "planFrozen": false
                      },
                      "sourceName": "",
                      "sourceParams": "",
                      "sourceType": "nil",
                      "sourceUUID": "",
                      "type": "blackhole",
                      "uuid": "6cc599ab7a85bf3b"
                  }
              },
              "uuid": "6cc599ab7a85bf3b"
          },
          "indexDefsCAS": 3,
          "indexDefsErr": null,
          "nodeDefsKnown": {
              "implVersion": "4.0.0",
              "nodeDefs": {
                  "78fc2ffac2fd9401": {
                      "container": "",
                      "extras": "",
                      "hostPort": "0.0.0.0:8094",
                      "implVersion": "4.0.0",
                      "tags": null,
                      "uuid": "78fc2ffac2fd9401",
                      "weight": 1
                  }
              },
              "uuid": "2f0d18fb750b2d4a"
          },
          "nodeDefsKnownCAS": 1,
          "nodeDefsKnownErr": null,
          "nodeDefsWanted": {
              "implVersion": "4.0.0",
              "nodeDefs": {
                  "78fc2ffac2fd9401": {
                      "container": "",
                      "extras": "",
                      "hostPort": "0.0.0.0:8094",
                      "implVersion": "4.0.0",
                      "tags": null,
                      "uuid": "78fc2ffac2fd9401",
                      "weight": 1
                  }
              },
              "uuid": "72d6750878551451"
          },
          "nodeDefsWantedCAS": 2,
          "nodeDefsWantedErr": null,
          "planPIndexes": {
              "implVersion": "4.0.0",
              "planPIndexes": {
                  "myFirstIndex_6cc599ab7a85bf3b_0": {
                      "indexName": "myFirstIndex",
                      "indexParams": "",
                      "indexType": "blackhole",
                      "indexUUID": "6cc599ab7a85bf3b",
                      "name": "myFirstIndex_6cc599ab7a85bf3b_0",
                      "nodes": {
                          "78fc2ffac2fd9401": {
                              "canRead": true,
                              "canWrite": true,
                              "priority": 0
                          }
                      },
                      "sourceName": "",
                      "sourceParams": "",
                      "sourcePartitions": "",
                      "sourceType": "nil",
                      "sourceUUID": "",
                      "uuid": "64bed6e2edf354c3"
                  }
              },
              "uuid": "6327debf817a5ec7",
              "warnings": {
                  "myFirstIndex": []
              }
          },
          "planPIndexesCAS": 5,
          "planPIndexesErr": null,
          "status": "ok"
      }
      POST /api/cfgRefresh

      Requests the node to refresh its configuration from the configuration provider.

      Permission Required: cluster.settings!write

      Role Required: Full-Admin, Cluster-Admin

      POST /api/managerKick

      Forces the node to replan resource assignments (by running the planner, if enabled) and to update its runtime state to reflect the latest plan (by running the janitor, if enabled).

      Permission Required: cluster.settings!write

      Role Required: Full-Admin, Cluster-Admin

      GET /api/managerMeta

      Returns information on the node’s capabilities, including available indexing and storage options as JSON, and is intended to help management tools and web UI’s to be more dynamically metadata driven.

      Permission Required: cluster.settings!read

      Role Required: Full-Admin, Cluster-Admin

      Node Diagnostics

      GET /api/diag

      Returns the full set of diagnostic information from the node in one shot as JSON. That is, the /api/diag response will be the union of the responses from the other REST API diagnostic and monitoring endpoints from the node, and is intended to make production support easier.

      For example, for a three node cluster, you could capture the /api/diag output of each node with something like:

      curl http://cbft-01:8094/api/diag > cbft-01.json
      curl http://cbft-02:8094/api/diag > cbft-02.json
      curl http://cbft-03:8094/api/diag > cbft-03.json

      The /api/diag response JSON object can be quite large, from 100’s of KB to much more.

      The motivation for /api/diag is to simplify working with the Couchbase community, forums, technical support and other engineers by making data capture from each FTS node a single step.

      Permission Required: cluster.logs!read

      Role Required: Full-Admin, Cluster-Admin

      GET /api/log

      Returns recent log messages and key events for the node as JSON.

      Permission Required: cluster.logs!read

      Role Required: Full-Admin, Cluster-Admin

      Sample response
      {
          "events": [],
          "messages": []
      }
      GET /api/runtime

      Returns information on the node’s software, such as version strings and slow-changing runtime settings as JSON.

      Permission Required: cluster.settings!read

      Role Required: Full-Admin, Cluster-Admin

      Sample response
      {
          "arch": "amd64",
          "go": {
              "GOMAXPROCS": 1,
              "GOROOT": "/usr/local/go",
              "compiler": "gc",
              "version": "go1.4"
          },
          "numCPU": 8,
          "os": "darwin",
          "versionData": "4.0.0",
          "versionMain": "v0.3.1"
      }
      GET /api/runtime/args

      Returns information on the node’s command-line, parameters, environment variables and O/S process values as JSON.

      Permission Required: cluster.settings!read

      Role Required: Full-Admin, Cluster-Admin

      POST /api/runtime/profile/cpu

      Requests the node to capture local cpu usage profiling information.

      Permission Required: cluster.admin

      Role Required: Full-Admin, Cluster-Admin

      POST /api/runtime/profile/memory

      Requests the node to capture lcoal memory usage profiling information.

      Permission Required: cluster.admin

      Role Required: Full-Admin, Cluster-Admin

      Node Management

      POST /api/runtime/gc

      Requests the node to perform a GC.

      Permission Required: cluster.admin

      Role Required: Full-Admin, Cluster-Admin

      Node Monitoring

      GET /api/runtime/stats

      Returns information on the node’s low-level runtime stats as JSON.

      Role Required: Full-Admin, Cluster-Admin

      GET /api/runtime/statsMem

      Returns information on the node’s low-level GC and memory related runtime stats as JSON.

      Role Required: Full-Admin, Cluster-Admin