getMapping #
Returns a collection mapping.
Available since 1.7.1
Also returns the collection dynamic mapping policy and collection additional metadata.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/<index>/<collection>/_mapping Method: GETOther protocols #
{ "index": "<index>", "collection": "<collection>", "controller": "collection", "action": "getMapping" }Arguments #
collection: collection nameindex: index name
Response #
Returns a mapping object with the following structure:
<index> |- mappings |- <collection> |- dynamic |- _meta |- metadata 1 |- metadata 1 |- properties |- mapping for field 1 |- mapping for field 2 |- ... |- mapping for field nExample: #
{ "status": 200, "error": null, "index": "<index>", "collection": "<collection>", "controller": "collection", "action": "getMapping", "requestId": "<unique request identifier>", "result": { "<index>": { "mappings": { "<collection>": { "dynamic": "true", "_meta": { "metadata1": "value1" }, "properties": { "field1": { "type": "integer" }, "field2": { "type": "keyword" }, "field3": { "type": "date", "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis" } } } } } } }