Skip navigation links

Package com.ibm.openpages.api

OpenPages with Watson Risk API

See: Description

Package com.ibm.openpages.api Description

OpenPages with Watson Risk API

Supporting interfaces for the OpenPages public API.

Getting started

The Risk API is a set of interfaces that allow you to interact with the OpenPages with Watson application when developing solutions to extend the application with new features. A factory pattern is used to retrieve the services which are the main starting points for interacting with an area of functionality.

Get the Context

To start a session with the Risk API you need to create a Context for the current user. To create a new Context without an existing OpenpagesSession provided by an existing OpenPages with Watson, you must provide user credentials:
Context context = new Context();
//add connection information for the environment, and user credentials
context.put(Context.SERVICE_USER_NAME, "jsmith");
context.put(Context.SERVICE_USER_PASSWORD, "****");


To create a new Context with an existing OpenpagesSession:
Context context = new Context();
//add connection with an existing OpenpagesSession
context.put(Context.SERVICE_SESSION,openpagesSession);

Note: To get a context in a Trigger Rule or EventHandler see AbstractEvent.getContext().
Note: To get a context a Workflow custom java action that extends or CustomJavaActionBase see com.ibm.openpages.api.workflow.action.CustomJavaActionBase#getContext().

Get the ServiceFactory

From the context, you may get a reference to the IServiceFactory which allows you to create any of the other services to interact with the OpenPages platform features:
//gets the serviceFactory reference IServiceFactory
serviceFactory = ServiceFactory.getServiceFactory(context);
//create the factories you need to use
IQueryService queryService = serviceFactory.createQueryService();
IMetaDataService metaService = serviceFactory.createMetaDataService();
IConfigurationService confService = serviceFactory.createConfigurationService();
//etc...


The factories are created using the current Context and any operation performed will be with that context and its user.

Available Services

The following public services are available in the Risk API along with a high level summary of features.


Refer to the javadoc for further information about each service com.ibm.openpages.api.service

Skip navigation links

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2020. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.