Data Client References API

It provides a way to consume artifacts files using API key or bearer tokens.

For the full ReferencesApi specification, see ReferencesApi.

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

Example

Scala
Java
val client = BaseClient()
val referencesApi = client.of[ReferencesApi]

val someArtifactHrn =
  "hrn:here:artifact::olp-here-test:com.here.platform:cli:12.3.39"
val filename = "cli-12.3.39.jar.sha1"
val apiKey = "<apiKey>"
val result = referencesApi
  .downloadArtifactFileByReference(someArtifactHrn, filename, Some(apiKey))
  .executeToBytes()

result
  .andThen {
    case Success(fileBytes: Array[Byte]) =>
      // do something with the content of file
      println(new String(fileBytes))
    case Failure(ex) =>
      ex.printStackTrace()
  }

Await.result(result, Duration.Inf)
BaseClient client = BaseClientJava.instance();
ReferencesApi referencesApi = new ReferencesApi(client);

String someArtifactHrn = "hrn:here:artifact::olp-here-test:com.here.platform:cli:12.3.39";
String filename = "cli-12.3.39.jar.sha1";
String apiKey = "<apiKey>";
byte[] fileBytes =
    referencesApi
        .downloadArtifactFileByReference(someArtifactHrn, filename, Optional.of(apiKey))
        .executeToBytes()
        .toCompletableFuture()
        .join();

// do something with the file content
System.out.println(new String(fileBytes));

results matching ""

    No results matching ""