How to use IBM App Connect with IBM Cloudant
- App Connect Enterprise as a Service connector
- Cloud-managed connector
- Local connector in containers (Continuous Delivery release)
- Local connector in containers (Extended Update Support release)
- Local connector in containers (Long Term Support release)
Connecting to IBM Cloudant
To connect App Connect to an IBM Cloudant account that you want App Connect to use, you need the following connection details:
- If your service instance uses IBM Cloud®
Identity and Access Management (IAM) authentication only, or
both legacy credentials and IAM, provide the following connection details:
- Cloudant host: The host name of the instance
- Cloudant API key: The API key for the instance
- If your service instance uses legacy credentials for authentication, provide the following
- Cloudant user name: The name of the service instance user
- Cloudant password: The password for the specified user name
- Example of completed fields for connecting from App Connect using IAM authentication only, or both legacy credentials and IAM
- Log in to IBM Cloud.
- From the IBM Cloud Dashboard, click the Cloudant service instance that you want to work with.
- To view the service credentials, click Service credentials in the left pane, and then
click View credentials. (If you want to define new credentials to use, click New
- If your service instance supports IAM authentication only, or both legacy credentials and IAM, copy the host and API key values, and paste them into the App Connect fields.
- If your service instance uses legacy (Cloud Foundry) authentication, copy the user name and password, and paste them into the App Connect fields.
To connect to IBM Cloudant from the App Connect Designer Catalog page for the first time, under IBM Cloudant click Connect. This creates an account in App Connect. For more information about ways to connect to IBM Cloudant, see Managing accounts in App Connect.
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 Catalog page, select the account, open its options menu (⋮), then click Rename Account.
What should I consider first?
Before you use App Connect Designer with IBM Cloudant, take note of the following considerations:
- To use Cloudant with App Connect, you must have provisioned a Cloudant NoSQL DB service on IBM Cloud.
- To configure the New document action, the Document ID field is optional. If you do not specify a value or data mapping, IBM Cloudant will assign an ID to the document created.
- You can specify your Cloudant document data structure
as data properties (with name and data type) or as a JSON object that consists of comma-separated
name/value pairs. For example:
- Cloudant document data structure specified as data
To specify your Cloudant document data structure as data properties, click Add property under the 'Document data' heading. (If you have been specifying document data as JSON, ensure that the ‘Document data’ field is empty and then click Add property.) For more information about specifying data properties, see Defining your own data properties.
- Cloudant document data structure specified as JSON:
To specify your Cloudant document data structure as JSON, ensure that there are no properties under the ‘Document data’ heading and then click ‘Edit mappings’.
- Cloudant document data structure specified as data properties:
- (General consideration) You can see lists of the trigger events and
actions that are available on the Catalog page of the App Connect Designer.
For some applications, the events and actions in the catalog depend on the environment (IBM Cloud Pak for Integration or App Connect on IBM Cloud) 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.
- (General consideration) 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
IBM Cloudant events
These events are for changes in this application that trigger a flow to start performing the actions in the flow.
IBM Cloudant actions
These are actions on this application that you want a flow to complete.
- Create attachment
- Retrieve attachments
- Update or create attachment
- Create database
- Retrieve databases
- Delete database
- Create document
- Retrieve documents
- Update document
- Update or create document
- Delete document
- Apply view
More items are available when you have connected App Connect to IBM Cloudant.
Use templates to quickly create flows for IBM Cloudant
Learn how to use App Connect templates to quickly create flows that perform actions on IBM Cloudant; for example, open the Templates gallery then search for IBM Cloudant.
Creating an event-driven flow that syncs updates to Salesforce data with IBM Cloudant documents
Learn how to use App Connect Designer to create an event-driven flow that when a new Salesforce contact is created, creates a document in IBM Cloudant with data from Salesforce. This tutorial demonstrates how to easily specify your own data properties for an IBM Cloudant document, without needing to write JSON.