Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to loop using curl command in alteryx

Ashwin1
7 - Meteor

Hi All, 

         I am not sure if this would be the place to ask this question but going to give it a try. 

I have an xml file and i am using CURL to send information to the website and fetch the values. I use RUN command in Alteryx to get it to work.  

The values which i will be sending as a request is in a CSV  file since it is more than one.

At the moment it only returns for one value so how do i loop through line by line.

 

Find below the XML file and CURL command

 

<?xml version="1.0" encoding="UTF-8" ?>
<request xmlns="http://www.xxxxx.com/xrpc42" src="app.id=xxxx Demo">
<fn name="xxxxxx.retrieve">
<list>
<!-- WHO'S REQUESTING -->
<map>
<val name="username">xxxxxxx</val>
<val name="password">xxxxxxx</val>
</map>
<!-- WHAT'S REQUESTED -->
<map>
<list name="xxx">
<val>timesCited</val>
<val>ut</val>
<val>doi</val>
<val>pmid</val>
<val>sourceURL</val>
<val>citingArticlesURL</val>
<val>relatedRecordsURL</val>
</list>
</map>
<!-- LOOKUP DATA -->
<map>
<map name="cite_1">
<val name="xx">J:\xxx\Team\General\xxxx/xxx.csv</val>
</map>
<map name="cite_2">
<val name="xxx">J:\xxxx\Team\General\xxxxx/xxxx.csv</val>
</map>
</map>
</list>
</fn>
</request>

 

 

CURL Command:    curl -v -H "content-type:text/xml" https://xxxxxxxxxx.com/cps/xrpc --data @xxxxx.xml

 

 

 

Any help or suggestion would be great. 

 

Thanks 

Ashwin

1 REPLY 1
WilliamR
Alteryx
Alteryx

Hi,

first question: why Curl and not the Download Tool? Is there something special in your request?

You can iterate using a batch macro if you need to iterate the Curl request. I have a sample on another topic I can provide in this case to help you.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Labels