How to use IBM® App Connect with Microsoft Azure Cosmos DB
Microsoft Azure Cosmos DB is a globally distributed, multi-model database service from Microsoft, which is designed to provide high availability, scalability, and low-latency access to data for modern applications.
- App Connect Enterprise as a Service connector
-
Local connector in containers (Continuous Delivery release) 13.0.2.2-r2 or later
Supported product and API versions
To find out which product and API versions this connector supports, see Detailed System Requirements on the IBM Support page.
Connecting to Microsoft Azure Cosmos DB
Complete the connection fields that you see in the App Connect Designer page (previously the Catalog page) or flow editor. If necessary, work with your Microsoft Azure Cosmos DB administrator to obtain these values.
- Microsoft Azure Cosmos DB connection fields:
- Server URL: Specify the URI created for the database account in the Microsoft Azure Cosmos DB service.
To obtain the connection values for Microsoft Azure Cosmos DB, see Obtaining connection values for Microsoft Azure Cosmos DB.
To connect to a Microsoft Azure Cosmos DB endpoint from the App Connect Designer Applications and APIs page for the first time, expand Microsoft Azure Cosmos DB, then click Connect. For more information, see Managing accounts.
Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Applications and APIs page, select the account, open its options menu (⋮), then click Rename Account.
General Considerations
Before you use App Connect Designer with Microsoft Azure Cosmos DB, take note of the following considerations:
- You can see lists of the trigger events and actions that are available
on the Applications and APIs page of the App Connect Designer.
For some applications, the events and actions depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.
- If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.
Events and Actions
Microsoft Azure Cosmos DB events
These events are for changes in this application that trigger a flow to start completing the actions in the flow.
Microsoft Azure Cosmos DB actions
Your flow completes these actions on this application.
| Object | Action | Description |
|---|---|---|
| Custom SQL queries | Run custom SQL query | Allows you to run custom SQL queries |
| Items | Create item | Creates an item to an Azure Cosmos DB container as a JSON document |
| Delete item | Deletes the item from the Azure Cosmos DB container | |
| Retrieve item by ID | Retrieves an item from the Azure Cosmos DB container using identifier | |
| Retrieve items | Retrieves items from the Azure Cosmos DB container | |
| Update item | Updates the existing item in the Azure Cosmos DB container |
Examples
- Templates
- Use the following templates to create flows for Microsoft Azure Cosmos DB. For more information, see Creating a flow from a template
- IBM community blogs
-
Read blog: Introducing Microsoft Azure Cosmos DB and Azure Service Bus Connectors in IBM App Connect