CosmosDB
Overview
Connect Superblocks to CosmosDB to build apps with read and write access to a CosmosDB database.
Setting up CosmosDB
1. Add integration
Select CosmosDB from the integrations page.
2. Configure settings
Fill out the form with the following settings:
Setting | Required | Description |
---|---|---|
Name | TRUE | Name that will be displayed to users when selecting this integration in Superblocks |
Host | TRUE | Hostname or IP address to connect to |
Port | TRUE | Port to use when connecting to CosmosDB |
Database ID | TRUE | ID of database to connect to |
Master Key | TRUE | The Master Key to access the database |
3. Test and save
Click Test Connection to check that Superblocks can connect to the data source.
If using Superblocks Cloud, add these Superblocks IPs to your allowlist (not necessary for On-Premise-Agent)
After connecting successfully, click Create to save the integration.
4. Set profiles
Optionally, configure different profiles for separate development environments.
CosmosDB connected Now you can use CosmosDB in any Application, Workflow, or Scheduled Job.
Creating CosmosDB steps
When using CosmosDB steps, there are 2 options:
SQL queries
Write SQL queries to interact with your CosmosDB instance directly.
Single object actions
Use single object actions to perform CRUD actions on a single object. Pass in an object of data in the Item Body. Actions supported include:
- Create a single object
- Read a single object
- Upsert a single object
- Replace a single object
- Delete a single object
See a tutorial for a basic CRUD guide
Troubleshooting
Check out our guide on common errors across database integrations, in addition to common CosmosDB connection issues. If you are encountering an error that you don't see in the guide, or the provided steps are insufficient to resolve the error, please contact us at help@superblocks.com.