How to insert two or more variable in http request

HI guy i am working on API which require 2 or more variable in the URL link
something like this:

by now i only able to work on SIng le variable like {{{query}}} or {{{payload}}}
but not more than one.
My http get would be like this
http://api.heclouds.com/devices//datapoints? datastream_id=3311_0_5851&start={{{starttime}}}&end={{{endtime}}}&limit={{{number}}}

Secondly, how can wait all the VARIABLE COME ALONG and then pass to the request at SAME time?

I would glad if anyone can help
thanks

Here's an example. Hope it helps

[{"id":"8367f315.5045f8","type":"inject","z":"4484ee28.caa3c","name":"","topic":"startdate","payload":"124","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":360,"wires":[["5266085a.2568f8"]]},{"id":"51495b9b.dec9f4","type":"inject","z":"4484ee28.caa3c","name":"","topic":"enddate","payload":"123","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":420,"wires":[["5266085a.2568f8"]]},{"id":"5266085a.2568f8","type":"join","z":"4484ee28.caa3c","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":330,"y":380,"wires":[["b6f9a794.7feec8","5fcee44d.821854"]]},{"id":"5fcee44d.821854","type":"change","z":"4484ee28.caa3c","name":"","rules":[{"t":"set","p":"payload.datapoint","pt":"msg","to":"123456","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":440,"wires":[["6d7c0132.1dcd6"]]},{"id":"6d7c0132.1dcd6","type":"http request","z":"4484ee28.caa3c","name":"","method":"GET","ret":"txt","paytoqs":true,"url":"http://192.168.1.10:8765","tls":"","persist":false,"proxy":"","authType":"","x":660,"y":380,"wires":[["b6f9a794.7feec8"]]}]

The answer is in the help. You can feed an object via the payload, tick the option in the request node and the object will be converted to parameters for you without needing to faff with a template.

The key point however is the different values are coming from different messages - they don't all appear in one message arriving at the request node.

This is what the example from @E1cid shows - using a join node to get the separate messages combined into one that can be passed to the request node.

thanks.~ for your help~

hi guy , i now worked ok , but what i do is to set the topic in each payload , and use the JOIN method mentioned by @E1cid.
here is what i do here:

[{"id":"3fbad7f3.36a838","type":"ui_dropdown","z":"2f75621.f7baf9e","name":"","label":"Meter Device Id","tooltip":"","place":"Select option","group":"f6786336.72d818","order":2,"width":0,"height":0,"passthru":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":320,"y":500,"wires":[["6d405dbf.f2acac","18d22cc6.bfac9b"]]},{"id":"c8b62a85.b3b4b","type":"ui_date_picker","z":"2f75621.f7baf9e","name":"","label":"Start Date","group":"f6786336.72d818","order":3,"width":0,"height":0,"passthru":false,"topic":"start","x":100,"y":580,"wires":[["1734e401.2be6bc"]]},{"id":"1dad7b5b.9d119d","type":"string","z":"2f75621.f7baf9e","name":"strip Z","methods":[{"name":"strip","params":[{"type":"str","value":"Z"}]}],"prop":"end","propout":"payload","object":"msg","objectout":"msg","x":410,"y":660,"wires":[["58473606.eb95a"]]},{"id":"d32dac5d.cffe5","type":"debug","z":"2f75621.f7baf9e","name":"test 05","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":790,"y":740,"wires":[]},{"id":"5a929689.857ad8","type":"join","z":"2f75621.f7baf9e","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":790,"y":620,"wires":[["df79fb87.27602"]]},{"id":"ca4592bf.beeb9","type":"debug","z":"2f75621.f7baf9e","name":"tes03","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":810,"y":560,"wires":[]},{"id":"1734e401.2be6bc","type":"function","z":"2f75621.f7baf9e","name":"change string","func":"//var d = new Date(msg.payload);\n//var str = d.toDateString; //Wed Oct 23 2019\n//msg.payload = str;\n//return msg;\nmsg.topic = \"start\"\nvar d = new Date(msg.payload);\nmsg.payload = d.toISOString();\nmsg.start = msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":580,"wires":[["d01a2fab.26079"]]},{"id":"d01a2fab.26079","type":"string","z":"2f75621.f7baf9e","name":"strip Z","methods":[{"name":"strip","params":[{"type":"str","value":"Z"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":410,"y":580,"wires":[["46876d8f.826254"]]},{"id":"46876d8f.826254","type":"function","z":"2f75621.f7baf9e","name":"set start query","func":"\nmsg.start = msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":580,"y":620,"wires":[["ca4592bf.beeb9","5a929689.857ad8"]]},{"id":"d5b42919.14588","type":"function","z":"2f75621.f7baf9e","name":"change string","func":"//var d = new Date(msg.payload);\n//var str = d.toDateString; //Wed Oct 23 2019\n//msg.payload = str;\n//return msg;\nmsg.topic = \"end\"\nvar d = new Date(msg.payload);\nmsg.payload = d.toISOString();\nmsg.end = msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":660,"wires":[["1dad7b5b.9d119d"]]},{"id":"58473606.eb95a","type":"function","z":"2f75621.f7baf9e","name":"set end query","func":"\nmsg.end = msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":580,"y":720,"wires":[["5a929689.857ad8","d32dac5d.cffe5"]]},{"id":"f52c6ba2.04c0b","type":"ui_date_picker","z":"2f75621.f7baf9e","name":"","label":"End Date","group":"f6786336.72d818","order":4,"width":0,"height":0,"passthru":false,"topic":"end","x":100,"y":660,"wires":[["d5b42919.14588"]]},{"id":"18d22cc6.bfac9b","type":"function","z":"2f75621.f7baf9e","name":"set id query","func":"msg.topic = \"id\"\nmsg.id = msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":540,"wires":[["5a929689.857ad8"]]},{"id":"f6786336.72d818","type":"ui_group","z":"","name":"Watermeter usage","tab":"842ee1bc.352ac","order":1,"disp":true,"width":"6","collapse":false},{"id":"842ee1bc.352ac","type":"ui_tab","z":"","name":"20200704","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.