How to use IBM App Connect with IBM Watson Discovery

IBM Watson Discovery is an analytics service which enables you to rapidly search both structured and unstructured data to extract meaningful insights.

Availability:
  • App Connect Enterprise as a Service connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release)
  • A local connector in a Designer instance of IBM App Connect in containers (Long Term Support)Local connector in containers (Long Term Support release)
  • A local connector in a Designer instance of IBM App Connect in containers (Support Cycle 2)Local connector in containers (Long Term Support Cycle-2 release)
The following information describes how to use IBM App Connect to connect IBM Watson Discovery to your other applications.

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.

What should I consider first?

Before you use App Connect Designer with IBM Watson Discovery, take note of the following considerations:

  • Before you use IBM App Connect Designer with IBM Watson Discovery, make sure you have provisioned the Watson Discovery service in IBM Cloud® and you have an environment and collection ready. To provision an IBM Watson Discovery, click the following link: IBM Cloud – Discovery.
  • You can use the Discovery tooling (a complete set of online tools) or the Discovery API to get started with IBM Watson Discovery and when you're ready you'll need to create an environment, and a collection to which you add documents. When this has been set up you can search your collection of documents to find specific information and extract actionable insights.
  • You can upload data in these supported formats.

    Data input can also be in binary format; this makes it easier to upload PDF and Word documents containing rich media content. The data is converted and enriched to make it easier to explore and discover insights. The data is then indexed into a collection from which you can create a query to understand the data and extract meaningful insights.

Connecting to IBM Watson Discovery

To connect App Connect to an IBM Watson Discovery account that you want App Connect to use, select your preferred application version and then provide the following connection details:

  • Version: Choose between v2 or v1
    Note: v2 is selected by default because v1 is due to be deprecated.
  • Authorization type: Provide credentials for App Connect to use (BASIC) (only value)
  • Base URL: Specify the base URL for your IBM Watson Discovery service instance
  • API key: Specify the API key if the service instance uses the Identity and Access Management (IAM) authentication
  • Username: Specify the username if the service instance uses the Cloud Foundry service credentials for authentication
  • Password: Specify the password for the associated username

To obtain the connection values for IBM Watson Discovery, see Obtaining connection values for IBM Watson Discovery.

To connect to a IBM Watson Discovery endpoint from the App Connect Designer Connect > Applications and APIs page (previously the Catalog page) for the first time, expand IBM Watson Discovery, then click Connect. For more information, see Managing accounts.

Tip:

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 IBM Watson Discovery, take note of the following considerations:

  • (General consideration) 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.

  • (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.
  • When you're creating your flow you'll need to enter a source name and source ID. The figure Figure 1 below illustrates where you specify the source name and ID in App Connect. The figure Figure 2 shows where these fields are displayed in the Watson Discovery tooling UI.
    Figure 1. Specify the Source and Source ID in App Connect
    Specify the Source and Source ID in App Connect
    Figure 2. In the Watson Discovery tooling, the source and source ID fields are displayed in the metadata section
    Watson Discovery tooling, showing the source and source ID fields

    (Click image to view full size)

  • You can also use the metadata section in the App Connect UI to attach tags or labels to your objects so that you can then use those to search for and retrieve objects in the Watson tooling UI.
    Figure 3. Add metadata in App Connect to facilitate search and retrieve of objects
    Add metadata in App Connect to facilitate search and retrieve of objects
  • Although Watson Discovery and the Add document object in App Connect support Word, HTML, and PDF documents; only JSON is supported for the other App Connect objects because you map to the payload in a JSON file and do not upload files. In the following image (Figure 4), a Salesforce Lead object has been selected. An example of the data that will be queried is displayed beneath the Salesforce lead object. This is the data that will be indexed into a collection, in other words, the data you want to query. The figure Figure 5 shows the query and illustrates where the data is displayed in the Watson Discovery tooling UI.
    Figure 4. Specify the input you want to index in the collection
    Specify the input you want to index in the collection
    Figure 5. Payload in the Watson tooling UI
    Payload in the Watson tooling UI

Events and actions

IBM Watson Discovery events

These events are for changes in this application that trigger a flow to start completing the actions in the flow.

Note: Events are not available for changes in this application. You can trigger a flow in other ways, such as at a scheduled interval or at specific dates and times.

IBM Watson Discovery actions

Your flow completes these actions on this application.

Documents
Add document
Retrieve documents
Update document
Update or create document
Delete document

Examples

Dashboard tile for a template that uses IBM Watson Discovery
Dashboard tile for a template that uses IBM Watson Discovery
Dashboard tile for a template that uses IBM Watson Discovery

Use templates to quickly create flows for IBM Watson Discovery

Learn how to use App Connect templates to quickly create flows that perform actions on IBM Watson Discovery; for example, open the Templates gallery, and then search for IBM Watson Discovery.