{
"basePath": "/",
"swaggerVersion": "1.1",
"apiVersion": "0.1",
"apis": [
{
"operations": [
{
"errorResponses": [],
"parameters": [
{
"dataType": "String",
"paramType": "query",
"required": true,
"name": "collection",
"description": "The collection name.
"
}
],
"notes": "
Returns an object with an attribute indexes containing an array of all index descriptions for the given collection. The same information is also available in the identifiers as an object with the index handles as keys.
",
"summary": " Read all indexes of a collection",
"httpMethod": "GET",
"examples": "
Return information about all indexes:
shell> curl --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"indexes\" : [ \n { \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"_key\" \n ] \n }, \n { \n \"id\" : \"products/1240213667\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"name\" \n ] \n }, \n { \n \"id\" : \"products/1240475811\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"sparse\" : true, \n \"fields\" : [ \n \"price\" \n ] \n } \n ], \n \"identifiers\" : { \n \"products/0\" : { \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"_key\" \n ] \n }, \n \"products/1240213667\" : { \n \"id\" : \"products/1240213667\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"name\" \n ] \n }, \n \"products/1240475811\" : { \n \"id\" : \"products/1240475811\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"sparse\" : true, \n \"fields\" : [ \n \"price\" \n ] \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/index/products/0\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"_key\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{\"type\":\"cap\",\"size\":10}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1241196707\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"byteSize\" : 0, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \n \"type\" : \"geo\", \n \"fields\" : [ \n \"b\" \n ] \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1241720995\", \n \"type\" : \"geo1\", \n \"unique\" : false, \n \"sparse\" : true, \n \"geoJson\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : true, \n \"fields\" : [ \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \n \"type\" : \"geo\", \n \"fields\" : [ \n \"e\", \n \"f\" \n ] \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1242245283\", \n \"type\" : \"geo2\", \n \"unique\" : false, \n \"sparse\" : true, \n \"constraint\" : false, \n \"ignoreNull\" : true, \n \"fields\" : [ \n \"e\", \n \"f\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ] \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1242769571\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ] \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1243293859\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \n \"type\" : \"hash\", \n \"unique\" : false, \n \"sparse\" : true, \n \"fields\" : [ \n \"a\" \n ] \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1243752611\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"sparse\" : true, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"a\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ] \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1244276899\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"sparse\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"sparse\" : true, \n \"fields\" : [ \n \"a\" \n ] \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1244735651\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"sparse\" : true, \n \"fields\" : [ \n \"a\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \n \"type\" : \"fulltext\", \n \"fields\" : [ \n \"text\" \n ] \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1245194403\", \n \"type\" : \"fulltext\", \n \"unique\" : false, \n \"sparse\" : true, \n \"minLength\" : 2, \n \"fields\" : [ \n \"text\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/index/products/1245718691\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1245718691\", \n \"error\" : false, \n \"code\" : 200 \n}\n