How to insert a variable in the url path
Hello guys!
I'm trying to build a dashboard for creating dynamic extensions on the asterisk using the REST of the asterisk itself, however the final object of the URL path is the extension number that will be informed on the dashboard, so it is necessary to pass this information to the URL field of the node http request.
I have tried it via query string but I have certainly done something wrong if it is possible to send this information over there.
Follow the print with the URL I need to assemble: (<USER> is just a highlight where I want to insert the variable with the extension number.)
[{"id":"41bdb42.b505b4c","type":"ui_form","z":"aaf61169.b76f3","name":"Auth","label":"Dados do UsuĆ”rio","group":"c264c8ca.7c1ef8","order":0,"width":0,"height":0,"options":[{"label":"Ramal","value":"username","type":"number","required":true,"rows":null},{"label":"Senha","value":"password","type":"password","required":true,"rows":null}],"formValue":{"username":"","password":""},"payload":"","submit":"Salvar","cancel":"Cancelar","topic":"userpass","x":170,"y":260,"wires":[["49dca02c.dd386"]]},{"id":"49dca02c.dd386","type":"function","z":"aaf61169.b76f3","name":"Auth","func":"flow.set('user', msg.payload.username);\nvar data_user = flow.get('user');\nvar data_pswd = msg.payload.password;\nmsg.headers = {};\nmsg.headers['Content-Type'] = 'application/json';\nmsg.payload = {\n \"fields\": [\n {\n \"attribute\": \"auth_type\",\n \"value\": \"userpass\"\n },\n {\n \"attribute\": data_user,\n \"value\": data_pswd\n },\n {\n \"attribute\": \"nonce_lifetime\",\n \"value\": \"32\"\n }\n ]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":310,"y":220,"wires":[["24ca682.8cde198"]]},{"id":"24ca682.8cde198","type":"http request","z":"aaf61169.b76f3","name":"PUT Auth","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://127.0.0.1:8088/ari/asterisk/config/dynamic/res_pjsip/auth/+data_user+{{{query}}}","tls":"","persist":false,"proxy":"","authType":"digest","x":460,"y":160,"wires":[["e3dbd495.d4cb78"]]},{"id":"e3dbd495.d4cb78","type":"debug","z":"aaf61169.b76f3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":80,"wires":[]},{"id":"c264c8ca.7c1ef8","type":"ui_group","name":"AutenticaĆ§Ć£o","tab":"f1ecfcfd.21cc3","order":1,"disp":true,"width":"6","collapse":false},{"id":"f1ecfcfd.21cc3","type":"ui_tab","name":"ConfiguraĆ§Ć£o de Ramais","icon":"dialer_sip","disabled":false,"hidden":false}]```