{
"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 a list of all index descriptions for the given collection. The same information is also available in the identifiers as hash map with the index handle as keys.
",
"summary": "reads all indexes of a collection",
"httpMethod": "GET",
"examples": "Return information about all indexes:
unix> 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 \"fields\" : [ \n \"_id\" \n ] \n } \n ], \n \"identifiers\" : { \n \"products/0\" : { \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"fields\" : [ \n \"_id\" \n ] \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n
unix> 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 \"fields\" : [ \n \"_id\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n
unix> curl -X POST --data @- --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/230501596\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n
unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/234040540\", \n \"type\" : \"geo1\", \n \"unique\" : false, \n \"geoJson\" : false, \n \"constraint\" : false, \n \"fields\" : [ \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n
unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/81997020\", \n \"type\" : \"geo2\", \n \"unique\" : false, \n \"constraint\" : false, \n \"fields\" : [ \n \"e\", \n \"f\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n
unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/242560220\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n
unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/247082204\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n
unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/132525276\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n
unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/113519836\", \n \"type\" : \"fulltext\", \n \"unique\" : false, \n \"minLength\" : 2, \n \"fields\" : [ \n \"text\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n
unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"x\", [0,1,[]], \"y\", [\"a\",\"b\",[]] ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/152251612\", \n \"type\" : \"bitarray\", \n \"unique\" : false, \n \"fields\" : [ \n [ \n \"x\", \n [ \n 0, \n 1, \n [ ] \n ] \n ], \n [ \n \"y\", \n [ \n \"a\", \n \"b\", \n [ ] \n ] \n ] \n ], \n \"undefined\" : false, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n
unix> curl -X DELETE --dump - http://localhost:8529/_api/index/products/190262492\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/190262492\", \n \"error\" : false, \n \"code\" : 200 \n}\n\n