0

I know how to list all bucket types using command line .reference http://stackoverflow.com/questions/30785431/how-to-list-all-the-bucket-types-in-riak

But I need it using HTTP call

achan1989
  • 101
  • 2
  • 10
  • can't understand what u mean. I just need http request. like for list all buckets , we use command "http://127.0.0.1:10018/buckets?buckets=true" – achan1989 Feb 22 '16 at 11:19
  • 2
    Unfortunately, it's currently not supported AFAIK, unlike buckets and keys. – vempo Feb 22 '16 at 12:29

1 Answers1

1

There is currently no way to list bucket types via HTTP. I can suggest two options:

  1. Wrap the riak-admin bucket-types list command in a simple Web service and expose it via HTTP.
  2. Install the experimental Riak Explorer, point it to your cluster, and use the bucket_types endpoint to list bucket types. For example, curl -X GET http://127.0.0.1:9000/explore/clusters/default/bucket_types should give you something like
{
    "bucket_types": [{
        "id": "default",
        "props": {
            "active": true,
            "allow_mult": true,
            "basic_quorum": false,
            "big_vclock": 50,
            "chash_keyfun": "{riak_core_util,chash_std_keyfun}",
            "dvv_enabled": false,
            "dw": "quorum",
            "last_write_wins": false,
            "linkfun": "{modfun,riak_kv_wm_link_walker,mapreduce_linkfun}",
            "n_val": 3,
            "notfound_ok": true,
            "old_vclock": 86400,
            "postcommit": [],
            "pr": 0,
            "precommit": [],
            "pw": 0,
            "r": "quorum",
            "rw": "quorum",
            "small_vclock": 50,
            "w": "quorum",
            "write_once": false,
            "young_vclock": 20
        }
    }],
    "links": {
        "self": "/explore/clusters/default/bucket_types"
    }
}
vempo
  • 3,093
  • 1
  • 14
  • 16