04-18-2019 10:04 AM
Hi,
Is there any Snaps available to execute the ‘cURL’ commands in Snaplogic? if Yes, Can you please let us know the process.
Thanks in Advance.
04-23-2019 10:43 PM
This type of sample curl comand : "curl -v http://localhost:8093/query/service
-d ‘statement=SELECT text FROM tweets WHERE rating = $1 AND when > $2&args=[ 9.5, “1-1-2014”]’ "
04-23-2019 11:16 PM
First of all, I hope your service http://localhost:8093/query/service is located within the plex/node where you are executing the pipeline. If not, then its an incorrect use-case. If yes, then there are two ways to do it.
(a) Use REST POST snap. The entire body can be given in Entity property.
(b) Use Script snap with python/javascript and invoke the post call using the respective library.
But, first option is the best and the easiest.
04-26-2019 12:25 AM
I have used Rest post snap and it is working for me
12-20-2019 07:04 AM
Sowmya,
I saw your post for running curl command and saw that you ran it successfully using REST POST. can you please share details how to run the curl command using REST POST.
Note: I need to run the curl command like
curl -v -u abc@pqr.com -H ‘Content-Type:application/json’ --data-binary ‘{“unlock”:true}’ ‘https://elastic.snaplogic.com/api/1/rest/asset/user/xyz@pqr.com’
04-08-2020 06:41 AM
Hi Anil,
Provide the URL “https://elastic.snaplogic.com/api/1/rest/asset/user/xyz@pqr.com” in service URL and mention content type as application/json
If you use username & password as authentication then use rest basic auth account for authorization