Data Client ConfigApi

The ConfigApi mirrors the Config Rest Api.

It provides basic catalog management operations and manages all platform resources needed for different kinds of catalogs and operations on these resources.

For the full ConfigApi specification, see ConfigApi.

The following pages describe the per-request configuration and metrics.

Example

Scala
Java
val client = BaseClient()
val configApi = client.of[ConfigApi]

val result = configApi.getCatalogs().executeToEntity()

result
  .andThen {
    case Success(response: CatalogsSummaryListResult) =>
      // do something with the list of catalogs
      response.results.map(_.items.map(_.foreach(cat => println(cat.hrn))))
    case Failure(ex) =>
      ex.printStackTrace()
  }
  .andThen {
    case _ =>
      client.shutdown()
  }

Await.result(result, Duration.Inf)
BaseClient client = BaseClientJava.instance();
ConfigApi configApi = new ConfigApi(client);

CatalogsSummaryListResult listResult =
    (CatalogsSummaryListResult)
        configApi.getCatalogs().build().executeToEntity().toCompletableFuture().join();

// do something with the list of catalogs
listResult
    .getResults()
    .ifPresent(
        summary ->
            summary
                .getItems()
                .ifPresent(
                    items -> items.forEach(cat -> System.out.println(cat.getHrn().get()))));

client.shutdown().toCompletableFuture().join();

results matching ""

    No results matching ""