Skip to main content
Solved

How to set up HTTPCaller to take the contents of a column of AttributeManager and concatenate at the end of the URL for multiple requests?

  • November 21, 2022
  • 6 replies
  • 133 views

Hell everyone,

 

I apoligize if this has been answered already but I haven't had any luck trying to find a solution. Basically I have a URL in HTTPCaller that I need to append a value at the end of so that I can run multiple GETs. The values that I need to append are stored in an AttributeManager column. I understand that I may need to create some type of looping function that will go through the list of attributes, append the first value to the end of the URL in HTTPCaller, run the GET request, save the results, get the next value in AttributeManager, append to the end of the URL, run the request, etc.. but not sure how this could be configured in FME. Ultimately we will need to place the results of all the GET requests in one data set.

Best answer by dustin

How many features are being processed in your AttributeManager? Just 1 feature with multiple attributes containing the values? Or are there multiple features entering the AttributeManager with a common attribute, but different attribute values?

 

If it's the later, the HTTPCaller will process a request for each feature that enters the transformers, so you could setup your Request URL in the Text Editor, appending the value to the end of your URL like in the screenshot below.image 

 

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.

6 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • Best Answer
  • November 21, 2022

How many features are being processed in your AttributeManager? Just 1 feature with multiple attributes containing the values? Or are there multiple features entering the AttributeManager with a common attribute, but different attribute values?

 

If it's the later, the HTTPCaller will process a request for each feature that enters the transformers, so you could setup your Request URL in the Text Editor, appending the value to the end of your URL like in the screenshot below.image 

 


  • Author
  • 3 replies
  • November 21, 2022

I am using 1 feature that is containing multiple attributes containing the values.


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • November 21, 2022

I am using 1 feature that is containing multiple attributes containing the values.

How many attributes do you have to process? Too many to just setup multiple HTTPCallers, one for each attribute?


  • Author
  • 3 replies
  • November 22, 2022

How many attributes do you have to process? Too many to just setup multiple HTTPCallers, one for each attribute?

Yes plus the number of attributes are dynamic so I won't know how many there are.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • November 22, 2022

If you use an AttributeExploder, you will get multiple features, one for each attribute and containing the attribute value. You should then be able to use these features to formulate your http request.


  • Author
  • 3 replies
  • November 22, 2022

Thank you for all your help. I was able to get this working using AttributeCreator by adding the name of the field at the end of the REST URL (@Value(serialNumber) then for the 2nd HTTPCaller I called the New Attibute name in the Request URL field.

 

AttributeCreator