Using Download Tool for Batch API Post request
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am trying to use the download tool for a POST API request on a Batch API but when I run the workflow I am getting a response for each line. When I run the request in Postman I receive what I'm looking for (Pic 1) but when running in Alteryx I get what I mentioned above (Pic 2).
I've seen post like this where a batch macro is used but it appears this is also making multiple calls instead of 1: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Iterative-macro-for-API-pagination-ret...
Is there a way to send a request that would have multiple lines so that I just get one response instead of individual ones? I've attached the documentation I received for the Batch API.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I was able to figure this out.
I had to use a summary tool and concatenate my request body so that I just had 1 row instead of the many I had.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you explain how you designed your workflow to make multiple requests? I tried setting the Payload to Take Query String/Body from field and setting variables in the payload and neither was successful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Basically, what I needed was to make one API call to the Batch API instead of the individual calls I was making. So in my first iteration of the workflow I was making a call for each address (figure 1). I used a summary tool to concatenate the addresses into one string using the settings in figure 2.
Lastly I used a formula tool to glue everything together onto the full POST request which I then used in the download tool (figure 3).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you @AdrianWSH ,
I will give it a try and provide an update. Hopefully, it works the same with multiple fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Looks like the Usgeocoder API will not help my situation. I'm trying to make a Post call using an input file containing multiple rows of data. I'm not sure how to parameterize the payload. There are 2 elements of the body string that is different for each row.
Here's my workflow:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Are you trying to use the Geocoder API as a test or do you actually need to pull address information? If you post an anonymized version of your workflow I might be able to help. I'm assuming your trying to make a batch macro?
![](/skins/images/9780FA8738778E76CAA545EFAA4CDA4D/responsive_peak/images/icon_anonymous_message.png)