A newer version of this documentation is available.

View Latest

Getting Bucket Information

  • reference
    +
    Information on buckets defined on the cluster can be retrieved, by means of the REST API.

    HTTP Methods and URIs

    GET /pools/default/buckets
    
    GET /pools/default/buckets/<bucket-name>

    Description

    GET /pools/default/buckets retrieves information on all buckets defined on the cluster. If the <bucket-name> path-parameter is added, only information on the specified bucket is retrieved.

    Curl Syntax

    curl -X GET http://<ip-address-or-domain-name>:8091/pools/default/buckets/<bucket-name>

    Responses

    Successful execution returns 200 OK, and either an object containing information on the individual bucket specified by the path-parameter; or an array of such objects, each containing information on one of the buckets defined on the cluster.

    Failure to authenticate returns 401 Unauthorized. An incorrectly specified URI returns 404 Object Not Found. If an internal error prevents successful execution, 500 Internal Server Error is returned.

    Example

    The following example returns information on a single bucket, which is travel-sample. The output of the call is piped to jq, to facilitate readability.

    curl -X GET -u Administrator:password \
    http://localhost:8091/pools/default/buckets/travel-sample | jq '.'

    If successful, the call returns 200 OK, and an object such as the following. (Note that actual console-output contains an extensive array of vBucket-information: this has been omitted from this example.)

    {
      "name": "travel-sample",
      "nodeLocator": "vbucket",
      "uuid": "f0861071add299fb8e6c3cc7fea20531",
      "uri": "/pools/default/buckets/travel-sample?bucket_uuid=f0861071add299fb8e6c3cc7fea20531",
      "streamingUri": "/pools/default/bucketsStreaming/travel-sample?bucket_uuid=f0861071add299fb8e6c3cc7fea20531",
      "bucketCapabilitiesVer": "",
      "bucketCapabilities": [
        "collections",
        "durableWrite",
        "tombstonedUserXAttrs",
        "couchapi",
        "subdoc.ReplaceBodyWithXattr",
        "subdoc.DocumentMacroSupport",
        "dcp",
        "cbhello",
        "touch",
        "cccp",
        "xdcrCheckpointing",
        "nodesExt",
        "xattr"
      ],
      "collectionsManifestUid": "1",
      "ddocs": {
        "uri": "/pools/default/buckets/travel-sample/ddocs"
      },
      "vBucketServerMap": {
        "hashAlgorithm": "CRC",
        "numReplicas": 1,
        "serverList": [
          "10.144.210.101:11210",
          "10.144.210.104:11210"
        ],
        "vBucketMap": [ ...
        },
    "bucketType": "membase",
    "authType": "sasl",
    "localRandomKeyUri": "/pools/default/buckets/travel-sample/localRandomKey",
    "controllers": {
      "compactAll": "/pools/default/buckets/travel-sample/controller/compactBucket",
      "compactDB": "/pools/default/buckets/travel-sample/controller/compactDatabases",
      "purgeDeletes": "/pools/default/buckets/travel-sample/controller/unsafePurgeBucket",
      "startRecovery": "/pools/default/buckets/travel-sample/controller/startRecovery"
    },
    "nodes": [
      {
        "couchApiBaseHTTPS": "https://10.144.210.104:18092/travel-sample%2Bf0861071add299fb8e6c3cc7fea20531",
        "couchApiBase": "http://10.144.210.104:8092/travel-sample%2Bf0861071add299fb8e6c3cc7fea20531",
        "clusterMembership": "active",
        "recoveryType": "none",
        "status": "healthy",
        "otpNode": "ns_1@10.144.210.104",
        "hostname": "10.144.210.104:8091",
        "nodeUUID": "b9070a682223ffc17fa4734f7584dc53",
        "clusterCompatibility": 458752,
        "version": "7.0.0-4953-enterprise",
        "os": "x86_64-unknown-linux-gnu",
        "cpuCount": 1,
        "ports": {
          "direct": 11210,
          "httpsCAPI": 18092,
          "httpsMgmt": 18091,
          "distTCP": 21100,
          "distTLS": 21150
        },
        "services": [
          "kv"
        ],
        "nodeEncryption": false,
        "addressFamilyOnly": false,
        "configuredHostname": "10.144.210.104:8091",
        "addressFamily": "inet",
        "externalListeners": [
          {
            "afamily": "inet",
            "nodeEncryption": false
          }
        ],
        "replication": 1,
        "systemStats": {
          "cpu_utilization_rate": 16.11624834874505,
          "cpu_stolen_rate": 0,
          "swap_total": 2047864832,
          "swap_used": 2895872,
          "mem_total": 1032990720,
          "mem_free": 477904896,
          "mem_limit": 1032990720,
          "cpu_cores_available": 1,
          "allocstall": 0
        },
        "interestingStats": {
          "couch_docs_actual_disk_size": 29727832,
          "couch_views_actual_disk_size": 0,
          "curr_items": 816,
          "curr_items_tot": 816,
          "ep_bg_fetched": 0,
          "couch_docs_data_size": 4151492,
          "mem_used": 34549632,
          "vb_replica_curr_items": 0,
          "vb_active_num_non_resident": 0,
          "cmd_get": 0,
          "get_hits": 0,
          "ops": 0,
          "couch_spatial_disk_size": 0,
          "couch_views_data_size": 0,
          "couch_spatial_data_size": 0
        },
        "uptime": "623",
        "memoryTotal": 1032990720,
        "memoryFree": 477904896,
        "mcdMemoryReserved": 788,
        "mcdMemoryAllocated": 788
      },
      {
        "couchApiBaseHTTPS": "https://10.144.210.101:18092/travel-sample%2Bf0861071add299fb8e6c3cc7fea20531",
        "couchApiBase": "http://10.144.210.101:8092/travel-sample%2Bf0861071add299fb8e6c3cc7fea20531",
        "clusterMembership": "active",
        "recoveryType": "none",
        "status": "healthy",
        "otpNode": "ns_1@10.144.210.101",
        "thisNode": true,
        "hostname": "10.144.210.101:8091",
        "nodeUUID": "a31c47ef63657f4bbda848c003710167",
        "clusterCompatibility": 458752,
        "version": "7.0.0-4953-enterprise",
        "os": "x86_64-unknown-linux-gnu",
        "cpuCount": 1,
        "ports": {
          "direct": 11210,
          "httpsCAPI": 18092,
          "httpsMgmt": 18091,
          "distTCP": 21100,
          "distTLS": 21150
        },
        "services": [
          "backup",
          "index",
          "kv",
          "n1ql"
        ],
        "nodeEncryption": false,
        "addressFamilyOnly": false,
        "configuredHostname": "10.144.210.101:8091",
        "addressFamily": "inet",
        "externalListeners": [
          {
            "afamily": "inet",
            "nodeEncryption": false
          }
        ],
        "replication": 1,
        "systemStats": {
          "cpu_utilization_rate": 100,
          "cpu_stolen_rate": 0,
          "swap_total": 2047864832,
          "swap_used": 507150336,
          "mem_total": 1032990720,
          "mem_free": 211714048,
          "mem_limit": 1032990720,
          "cpu_cores_available": 1,
          "allocstall": 0
        },
        "interestingStats": {
          "couch_docs_actual_disk_size": 24436718,
          "couch_views_actual_disk_size": 0,
          "curr_items": 0,
          "curr_items_tot": 816,
          "ep_bg_fetched": 0,
          "couch_docs_data_size": 4142766,
          "mem_used": 30410528,
          "vb_replica_curr_items": 816,
          "vb_active_num_non_resident": 0,
          "cmd_get": 0,
          "get_hits": 0,
          "ops": 0,
          "index_disk_size": 15569260,
          "index_data_size": 26966311,
          "couch_spatial_disk_size": 0,
          "couch_views_data_size": 0,
          "couch_spatial_data_size": 0
        },
        "uptime": "36734",
        "memoryTotal": 1032990720,
        "memoryFree": 211714048,
        "mcdMemoryReserved": 788,
        "mcdMemoryAllocated": 788
      }
    ],
    "stats": {
      "uri": "/pools/default/buckets/travel-sample/stats",
      "directoryURI": "/pools/default/buckets/travel-sample/stats/Directory",
      "nodeStatsListURI": "/pools/default/buckets/travel-sample/nodes"
    },
    "autoCompactionSettings": false,
    "replicaIndex": false,
    "replicaNumber": 1,
    "threadsNumber": 3,
    "quota": {
      "ram": 419430400,
      "rawRAM": 209715200
    },
    "basicStats": {
      "quotaPercentUsed": 15.48770904541016,
      "opsPerSec": 0,
      "diskFetches": 0,
      "itemCount": 816,
      "diskUsed": 54164550,
      "dataUsed": 8294258,
      "memUsed": 64960160,
      "vbActiveNumNonResident": 0
    },
    "evictionPolicy": "valueOnly",
    "storageBackend": "couchstore",
    "durabilityMinLevel": "none",
    "pitrEnabled": false,
    "pitrGranularity": 600,
    "pitrMaxHistoryAge": 86400,
    "fragmentationPercentage": 50,
    "conflictResolutionType": "seqno",
    "maxTTL": 0,
    "compressionMode": "passive",
    "saslPassword": ""
    }

    See Also

    An overview of buckets is provided in Buckets. An introduction to scopes and collections is provided in Scopes and Collections.