Hey guys,
I’m brand new to API’s so go easy on me. I’m trying to send a query to the setlist.fm API. I want to send the band name and the event date, then have it give me the location of the concert and the url to the page of the setlist. This is what I’m sending to the Post Request node:
[ {
“artistName” : “American Head Charge”
“eventDate” : “2000-06-11”
“format” : “json”
“url” : true
“venue” : true
} {
“artistName” : “Coal Chamber”
“eventDate” : “1997-09-13”
“format” : “json”
“url” : true
“venue” : true
} ]
For that you would need to construct the GET request query (String Manipulator, Column Expression node) and put all those request in a loop with a Table Row to Variable Loop Start. In the GET Request node, make the connection URL flow variable controlled.
I’m not sure how you got the JSON column there but that won’t do anything for this particular API. It’s all query based
If you go to the Swagger documentation, you can fill in values for the different parameters and click Try it out! It will then automatically provide the correct URL that you can use in KNIME to get the data. Also mind stuff like date formatting which is different from what you originally have.
Also note that this API has a fair use policy of max. 2 request per second for the free option. Since you are looking to iterate through a list, enable the delay option in the GET Request node to avoid that the API will bounce your request due to this (in case you are using the free option).
I’m getting results! You’re the best! I’ve hit one last snag if you don’t mind taking a look. I’m trying to parse the XML using the XML Reader, but it’s not recognizing the variable I created using the Table Row to Variable node. Any ideas what I’m doing wrong?