Page tree
Skip to end of metadata
Go to start of metadata

Watson Work Services is a set of endpoints for:

  • REST services
  • GraphQL queries
  • Webhooks

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/";

The authentication endpoint is passed when instantiating the WWClient class. The GraphQL endpoint is used by the WWGraphQLEndpoint class, which should be used for all GraphQL queries and mutations, to ensure only supported calls are made with the correct arguments, fields and children. The v1 space id endpoint is used for posting messages to a space.

2 Comments

  1. Anonymous

    I appreciate the efforts you people put, I believe I will also inspired by you and feel about extra new ideas. We are offering high-resolution web development, and that put us the supreme Website Design Company in Oman. We are providing the best website design and development services in an affordable pricing plan among other companies.

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.