On this page

Add index to a table

Add index to a table

Method : POST
URI : /db/<dbname>/<table_name>/index

"index_name": <index_name>,
"key_type": <key_type>,
"key_size": <key size in bytes>,
"allow_duplicate": <0 or 1>

The body is very similar to that of create table. There are many more attributes here that we could use to set the index in a particular manner. See the details here.


curl -H "Content-Type: application/json" -d '{"index_name":"org","key_type":1,"key_size":32}' -X POST


"msg": "successfully created the index"
Was this article helpful to you? Yes No