Skip to main content
Question

Trying to pass location ID into URL for HTTPCaller

  • December 11, 2018
  • 2 replies
  • 28 views

Hi, I'm new to pulling data from an API and looking for some advice.

 

So far I have been able to get part of the JSON data I need from an API using the HTTPcaller and using the JSONFragmentor. I have a header and an API key to access the data.

 

My data now looks like this.

I now need to grab each location id (location id field is "lid") and pass that value into another URL using the HTTPcaller to extract more detailed data for each location.

My end goal is to have the all the data in the above screen cap joined to the additional detailed data that I get from passing the "lid" into the url. Then I can have a point feature for each location "lid" with a complete set of attributes.

 

Any advice would be appreciated. I am just not sure how to pass the "lid" into the URL for each record, then move or loop onto the next record in the dataset.

Thanks

Sherriff

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • December 11, 2018

There is no need for looping. The JsonFragmentor has produced one feature for every record from the original API request. When you connect the second HTTPCaller, it will be triggered once for every feature that enters.

Set the Request URL to the detailed API endpoint using @Value(lid) in the appropriate place.

ex. https://api.endpoint/getData?id=@Value(lid)


  • Author
  • December 11, 2018

Great, thank you for the help. This was exactly what I need.

 

Sherriff