The endpoints can be called via a REST client authenticated as an application or as a user. The Java SDK provides a Watson Workspace Apache HTTP Client, the org.opencode4workspace.WWClient class. This class provides methods to build for application or user authentication, authenticate, as well as basic helper methods to retrieve the various GraphQL queries. For more complex GraphQL queries and REST calls, the WWClient will be passed to the relevant endpoint.
All required endpoints can be found ias static strings in the org.opencode4workspace.endpoints.WWDefinedEndpoints class:
public static final String AUTHENTICATION = "https://api.watsonwork.ibm.com/oauth/token"; public static final String GRAPHQL = "https://api.watsonwork.ibm.com/graphql"; public static final String V1_SPACE_ID = "https://api.watsonwork.ibm.com//v1/spaces/";