{
"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 --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/1245062197\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"name\" \n ] \n }, \n { \n \"id\" : \"products/1245324341\", \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/1245062197\" : { \n \"id\" : \"products/1245062197\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"sparse\" : false, \n \"selectivityEstimate\" : 1, \n \"fields\" : [ \n \"name\" \n ] \n }, \n \"products/1245324341\" : { \n \"id\" : \"products/1245324341\", \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 --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 <<EOF\n{\"type\":\"cap\",\"size\":10}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1246045237\", \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 <<EOF\n{ \n \"type\" : \"geo\", \n \"fields\" : [ \n \"b\" \n ] \n}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1246569525\", \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 <<EOF\n{ \n \"type\" : \"geo\", \n \"fields\" : [ \n \"e\", \n \"f\" \n ] \n}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1247093813\", \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 <<EOF\n{ \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ] \n}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1247618101\", \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 <<EOF\n{ \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ] \n}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1248142389\", \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 <<EOF\n{ \n \"type\" : \"hash\", \n \"unique\" : false, \n \"sparse\" : true, \n \"fields\" : [ \n \"a\" \n ] \n}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1248601141\", \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 <<EOF\n{ \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ] \n}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1249125429\", \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 <<EOF\n{ \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"sparse\" : true, \n \"fields\" : [ \n \"a\" \n ] \n}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1249584181\", \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 <<EOF\n{ \n \"type\" : \"fulltext\", \n \"fields\" : [ \n \"text\" \n ] \n}\nEOF\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1250042933\", \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 --dump - http://localhost:8529/_api/index/products/1250567221\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1250567221\", \n \"error\" : false, \n \"code\" : 200 \n}\n