An example Data Stream can be found below that demonstrates how to use this Action Agent to get current weather from different cities.

You can download the files here to try it out for yourself - adjusting the steps to use your own Restful API details. Sign up for a free Weatherstack account here, and update the CSV file with your API key.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the REST API Action Agent onto the canvas, link the input endpoint to city data, the output to the printer, and save the Data Stream.

Step 2: Configure General

Select the Agent and click Configure. Keep the default Collection.

Step 3: Configure Service Details

Enter the Base URL of the REST API.

Upload the Metadata Configuration File.

Step 4: Configure Operations

Select the operation and result entity (defined in the uploaded metadata configuration file). In this case, set the operation to 'Get Current Weather' and the result entity to Current.

Step 5: Configure Input Mapping

The input mapping grid is populated when the operation is selected. Set the access key and the city to Sydney. Apply the changes and save the Data Stream.

Please register an account from here for an API key, in order to use this example.

Step 6: Results

Click Publish.

Let's look at the Live Data View. The current weather for each city, the output from the REST API, is printed.


See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Last updated