Skip to main content

CosmosDB

Summary

This document covers the information to gather from Azure and CosmosDB in order to configure a Qarbine data service. The data service will use the Qarbine MongoDB API driver. You can define multiple data services that access the same CosmosDB endpoint though with varying credentials. Once a data service is defined, you can manage which Qarbine principals have access to it and its associated CosmosDB data. A Qarbine administrator has visibility to all data services.

Overview

Azure Cosmos DB is a distributed, multi-model database-as-a-service.It exposes data through several API flavors, allowing developers to choose the most suitable model for their application. It supports various data models, including relational, document, vector, key-value, graph, and table. Qarbine currently supports the MongoDB flavor of CosmosDB.

CosmosDB for MongoDB Configuration

The MongoDB API allows you to model data using document-based structures within Cosmos DB. Qarbine requires the CosmosDB for MongoDB connection string and optionally a database to configure a data service using the MongoDB API driver.

Navigate to the Azure Portal at https://portal.azure.com/#home

Click on

  

Select the target CosmosDB for MongoDB service.

In the left pane of your Cosmos DB account, select Connection strings.

  

The Connection strings pane will open, displaying all the necessary information to connect to your account using a MongoDB driver, including a preconstructed connection string.
The connection string format for CosmosDB using the MongoDB API is generally as follows:

mongodb://username:password@host:port/database?ssl=true

Click the far right icon to copy the connection string to the clipboard.
  

Paste it into a temporary area and adjust the userName and password as appropriate.

Once you have the connection string then refer to the MongoDB API Access document for further steps.