Previous tutorial 10 - Get a Client ID

In this tutorial you will learn how to create and configure a WebService miniApp that provides the caller with the exchange rate for the US Dollar.

What is a WebService miniApp?

The WebService miniApps allow you to pull data from an endpoint by making API requests, and manipulate that data as you see fit and use it in other miniApps. For example, with the WebService miniApp you can get a JSON with particular data that you can manipulate with. In our case, we will create a WebService miniApp to get the currency exchange rate of the US Dollar.

Create a WebService miniApp

To create a WebService miniApp, follow the steps below:

  1. Select miniAppsManage on the left pane.

  2. Click the +Create button

  3. Fill in fields of the Create OCP miniApps® pop-up window:

  • Select the Type of your miniApp. For introduction purposes, we select WebService.

  • Select a language. In our case, we select English, United States.

  • Give your application a Name. In our case, the application name is GS_WS_getRates

  • Select Group. For introductory purposes, we have created a group named GettingStarted.

  • In the Data Privacy field select None.

4. Click Create.

Configure a WebService miniApp

Once the miniApp is successfully created, you need to configure the Web Services, Outputs and Wait parameters.
The Web Services enable you to specify different API endpoints within one miniApp. The Ouputs allow you to map which data you want to get from the JSON of the returned Web Service request.

Navigate here to learn more about configuring the WebService miniApp.

To configure the WebService miniApp, provide settings for Web Services, Outputs and Wait by following these steps:

  1. Switch to the Web Services tab.

  2. Specify the API method. In our case, we use the GET method.

  3. Prepare the endpoint’s address in a JSON format, so it could be pasted next to the method. In case your endpoint requires some parameters or the request body, you can configure it by switching the Form Data Toggle button on and provide the values accordingly. In our case, we don’t need parameters or the request body, so we switch the Form Data Toggle button off. Read here to learn more about configuring the WebService miniApp.

4. Switch to the Outputs tab. In our case, you need to select path for the output and provide values for the local currency. For introduction purposes, we select Mexican Peso, Canadian Dollar and European Euro as currencies. Fill in the output fields accordingly

5.Switch to the Wait tab to provide the waiting prompts the user hears while waiting for the data. You can configure the timeout once the waiting prompt is triggered depending on the waiting announcements. It is either possible to use the suggested settings, or to provide your own.

8. Click the Save Changes button.

Next tutorial 12 - Create a Dynamic Announcement