How to use IBM App Connect with IBM Watson Discovery

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

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 to 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 that you provision 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 tools (a complete set of online tools) or the Discovery API to get started with IBM Watson Discovery. When you're ready, you need to create an environment and a collection to which you add documents. You can then 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, so you can upload PDF and Word documents that contain rich media content. The data is converted and enriched so that you can 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 provide the following connection details.
  • Set Version to v2 or v1.
    Note: v2 is selected by default because v1 is due to be deprecated.
  • Authorization type identifies the credentials to use for App Connect (BASIC) (the only value).
  • Base URL is the base URL for your IBM Watson Discovery service instance.
  • API key is the API key if the service instance uses the Identity and Access Management (IAM) authentication.
  • Username is the username if the service instance uses the Cloud Foundry service credentials for authentication.
  • Password is 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 must enter a source name and source ID. The following examples illustrate where to specify the source name and ID in App Connect, and where these fields are shown in the Watson Discovery tools 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 tools, the source and source ID fields are displayed in the metadata section
    Watson Discovery tooling, showing the source and source ID fields
  • You can also use the metadata section in App Connect to attach tags or labels to your objects that you can use to search for and retrieve objects in the Watson 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
  • Watson Discovery and the Add document object in App Connect support Word, HTML, and PDF documents, but only JSON is supported for other App Connect objects. This restriction is because you map to the payload in a JSON file and don't upload files. In the following image (Figure 4), a Salesforce Lead object is selected. An example of the data that is queried is shown. This data is indexed into a collection, which is the data that you want to query. The figure Figure 5 shows the query and illustrates where the data is shown in the Watson Discovery UI.
    Figure 4. Specify the input that you want to index in the collection
    Specify the input you want to index in the collection
    Figure 5. Payload in the Watson tools 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.

Object Action Description
Documents Add document Adds a document to a Watson Discovery collection to enable the search and analysis
Delete document Deletes a document
Retrieve documents Retrieves the documents from a Watson Discovery collection
Update document Updates a document
Update or create document Updates an existing document, or creates a new document if it doesn't exist

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 complete actions on IBM Watson Discovery; for example, go to the Discover page and search for IBM Watson Discovery.