Skip to main content

I am trying to build an API POST call using HTTPCaller for situations where there will be a dynamic number of parameters using the same name based on an aggregated list.

 

In this instance, I have an attribute value called "fee id" which could have anywhere from 1-20+ items in the list (built using Aggregator) depending on how many charges were processed in a specific transaction. Each item on the list needs to be its own parameter (the values cannot be comma-separated), which is where I'm running into trouble. I can configure HTTPCaller manually to handle this, but that is only in my tests where I know ahead of time how many items will need to be processed.

 

query string 

I have been unable to find a way for FME/HTTPCaller to accommodate dynamically generating a query string parameter for each item in the list. Is this possible?

 

Even though it is not the most elegant solution, I also tried playing around with using a conditional statement for the name column (i.e., if a value in "fee_id(1)" exists...), but a) that doesn't seem to allow omitting the value line completely if the condition is not met, and b) I get the error Could not load module 'C:\\Program Files\\FME\\plugins/_func.dll' : 'The specified module could not be found' when attempting to run HTTPCaller when a condition is added.

 

condition

Explode the list out (ListExploder), then you'll have one feature for each Account_id. Then use the Account_id to set the query string in the HTTP Caller


Explode the list out (ListExploder), then you'll have one feature for each Account_id. Then use the Account_id to set the query string in the HTTP Caller

Thanks for your response! I tried that before, but in using that method there still doesn't seem to be a way to create each parameter dynamically based on the number of Account_id features that are created... unless I'm missing something.


Reply