Look at the following external API as an example: https://api.thedogapi.com/v1/breeds. Clicking the link opens the API response that contains a JSON object with dog breed data. You might want to use only one piece of that information in a Dropdown or Multi-Select Dropdown component. In this how-to guide, you'll create a drop-down that lists only the dog breed names.
Here's how the completed use case looks in the Module Builder:
How to Make an External API Call in a Multi-Select Dropdown Component
Making external API calls in a Multi-Select Dropdown component is a two-part process. First, the external API service is set up on the Services Administration page. Next, a Multi-Select Dropdown uses the external API service.
NOTE If you are completing this lab in the Training environment, the Dog API is likely already set up. Double-check the list of Active Services before completing this step. If the Dog API is on the list of Active Services, move to the Configure the Multi-Select Dropdown Component section.
To add the Dog API external service to Services Administration:
1.
At the top right of the Unqork Designer Platform, click Settings.
In the Item Template field, enter <span>{{ item.name }}</span>. This sets the HTML display for each item.
5.
From the component's configuration window, select Data.
6.
From the Data Source Type, select URL.
7.
From the Service drop-down, select Dog API.
8.
In the Data Source URL, enter breeds.
9.
In the Value Property field, enter name. The Value Property setting maps the name value in the JSON Object from the API response to the Multi-Select Dropdown selections.