Help Desk

Submit a ticket My Tickets
Welcome
Login

How do Sample JSON Keys work with the HTTP BizApp?

The OneCloud HTTP BizApp has the four standard commands expected by any REST API. Those Commands are as follows:

  • GET
  • POST
  • PUT
  • DELETE

Each of these Commands also allow the inclusion of an Output Schema where you can enter a sample payload for each output that can produce JSON. This will enable access to the properties of this output in downstream Commands.

Lets explore this feature:

Sample JSON Data:

{
  "executionTime": "2020-03-05 12:48:34 PM",
  "stationBeanList": [{
      "id": 304,
      "stationName": "Broadway and Battery Pl",
      "availableDocks": 9,
      "totalDocks": 33,
      "latitude": 40.70463334,
      "longitude": -74.01361706,
      "statusValue": "In Service"
    }
  ]
}

This data is available live at: https://feeds.citibikenyc.com/stations/stations.json.

Configuration of the Command:

Usage of the JSON Keys

In the following example, the Create Directory command is being used to illustrate how individual items can be plucked from the response and automatically added to the Iteration and File Path inputs.

Variable Transformation

Use Variable Transformation to pluck the stationName from each iteration in the JSON list in the Response Iteration.

Publish and Run

Publish and run this sample and see the results. In the example below, a OneCloud GroundRunner is installed on a Windows 10 environment to create a list of files with New York City Citibike stations. These stations are retrieved from the JSON list in the StationBeanList JSON list key and each file contains the value of the executionTime JSON key. 

As always, we welcome questions on this post or feel free to contact us at support@onecloud.io.

Login to post a comment