API Consumer
Now that you have browsed the API Portal and registered / tested the API's that ThinkIBM is providing, it's time to test them out from a real application.

You have been provided access to a sample consumer application which will be used to interact with the ThinkIBM API's.

Launch the Web Application

  1. Open a new browser tab and navigate to:

    https://thinkibm-consumer.mybluemix.net

  2. In order to set up the consumer app to target your APIs and use your registered client credentials, a setup screen will be displayed asking for some application configuration parameters.

  3. Using the Client ID, Client Secret and API Endpoint values you saved earlier in your text editor, copy/paste them into their respective fields as shown below:

  4. Click the Submit button to complete the application configuration. The test application saves your settings in browser session variables.

  5. The home page is a simple landing page which does not invoke any of the API’s. Recall that in Lab 3 you secured the inventory API by requiring an OAuth token. If you attempt to view the Item Inventory before logging in, you will be challenged for a username and password. Either click on the Browse Item Inventory button, or the Log In link to open the login prompt.

  6. Enter any Username and Password then click the Log In button. Our sample authentication service is a dummy repository that will accept any credentials provided.

  7. Once you are logged in, the consumer application will redirect you to the item inventory page. The data displayed on the page is being powered by your inventory API! The consumer application is calling to our API, which is then being sent to our LoopBack application which handles the connection to the MySQL data source where the inventory item data is persisted.

  8. Click around the pages to test the features of the consumer application. Try entering your home zip code to obtain shipping data. This feature is powered by the logistics APIs that were built using advanced assembly techniques in Lab 5. Your quotes will vary based on the zip code provided.

    Notice how you are also provided a link to the nearest store. Clicking here will launch the Google Maps link which was also built in the Lab 5 assembly.

  9. Finally, try clicking on the Calculate Monthly Payment link. This feature is powered by the financing API that was created using our REST-to-SOAP assembly in Lab 5.

  10. Repeat the steps on a few of products to drive data into the analytics database.

Completion

Congratulations! You have completed Lab 7!

Proceed to Lab 8 - Analytics in API Connect