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
  • 73 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 

 

View original
Did this help you find an answer to your question?

6 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • 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
  • November 21, 2022

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


dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • November 21, 2022
atc wrote:

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
  • November 22, 2022
dustin wrote:

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+32
  • Influencer
  • 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
  • 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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings