Category / Section
How to connect Azure Cosmos DB with Bold BI?
Published:
Azure Cosmos DB provides REST APIs through which it can be connected with Bold BI using the Generic Web API connector. Follow the REST
API documentation to find the API details.
In the Create Data Source window of Web API connector, pass the following details and click Connect. Now, you can connect your data in Cosmos DB in Azure.
- API endpoint URL
- Method Type
- Headers
Generating Authorization token
For the Authorization header, you need to generate the authorization token using the given C# or JavaScript code, then pass it in the header as shown in the above image.
The inputs needed to run the code are,
key - From your Azure portal, navigate to the Cosmos DB account and open Keys tab in the left-side menu and copy the key under Read-write keys(Master key) or Read-only keys(resource key)
keyType - Master or Resource Token https://learn.microsoft.com/en-us/rest/api/cosmos-db/access-control-on-cosmosdb-resources
tokenVersion - "1.0", As mentioned in the above document
tokenVersion - "1.0", As mentioned in the above document
signature - Follow the sample to generate the signature
Related Links
How Cosmos DB for MongoDB works - https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/introduction#how-cosmos-db-for-mongodb-works
Common Cosmos DB REST Request Headers - https://learn.microsoft.com/en-us/rest/api/cosmos-db/common-cosmosdb-rest-request-headers