I have started to work with Azure Cosmos DB Sql Api. I have found two different Java APIs which can be used to manage this database:
com.azure::azure-cosmos
After following Quick start demo (available in the Azure portal Quick start section)
I have downloaded demo code, which has dependency on:
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.0.0-preview.1</version>
</dependency>
This Api is described here: azure-cosmos. In this Api I found couple of useful classes like CosmosClientBuilder, CosmosContainer.
com.microsoft.azure::azure-documentdb
However, after reading documentation from docs.microsoft.azure.com I found that they recommend to use com.microsoft.azure::azure-documentdb:
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-documentdb</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-cosmosdb</artifactId>
<version>2.6.5</version>
</dependency>
In this Api I do not see the useful CosmosClientBuilder class, and the way of creating connection to the database is little different.
I wonder which Api is recommended to use? Do they serve different purposes?