SDK
SDK C# v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

GetMappingAsync #

Returns the mapping for the given collection.

Arguments #

public async Task<JObject> GetMappingAsync(
        string index,
        string collection);
ArgumentTypeDescription
index
string
Index name
collection
string
Collection name

Return #

A JObject representing the collection data mapping.

Usage #

try {
  JObject mapping = await kuzzle.Collection.GetMappingAsync("nyc-open-data", "yellow-taxi");
  Console.WriteLine(mapping["properties"]?.ToString(Formatting.None));
  // {"properties":{"license":{"type":"keyword"},"driver":{"properties":{"name":{"type":"keyword"},"curriculum":{"type":"text"}}}}}
} catch (Exception e) {
  Console.WriteLine(e);
}