Here are two subflows I use for fetching data and controlling the printer. I haven't specifically done pause but hopefully you can work it out. This one is for controlling
[{"id":"4f52e314.3dc974","type":"subflow","name":"OctoPrint Post","info":"### Octoprint\n\nConfigure the node; IP/hostname, API key.\nSelect an option to query from OctoPrint\n\nConnected an inject node and a debug node\nInject anything\n","category":"","in":[{"x":44,"y":48,"wires":[{"id":"87d914a3.62cc7"}]}],"out":[{"x":647,"y":151,"wires":[{"id":"ff32c862.5e7ee","port":0},{"id":"c579c1f4.bda66","port":1}]},{"x":651,"y":206,"wires":[{"id":"3e677f54.d2d6a8","port":0},{"id":"c579c1f4.bda66","port":2}]}],"env":[{"name":"url","type":"str","value":"x201-1804.local:5000","ui":{"label":{"en-US":"http://"},"type":"input","opts":{"types":["str"]}}},{"name":"api","type":"str","value":"D8EB8EAB94164A29929CD6B8568FE859","ui":{"label":{"en-US":"API key"},"type":"input","opts":{"types":["str"]}}},{"name":"request","type":"str","value":"files","ui":{"label":{"en-US":"Type"},"type":"select","opts":{"opts":[{"l":{"en-US":"Printer Operations"},"v":"printer"},{"l":{"en-US":"Jobs"},"v":"job"},{"l":{"en-US":"Files"},"v":"files"},{"l":{"en-US":"Connection"},"v":"connection"}]}}}],"color":"#C7E9C0","icon":"font-awesome/fa-print"},{"id":"561a7887.6639c","type":"http request","z":"4f52e314.3dc974","name":"http POST","method":"POST","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":341,"y":48,"wires":[["c579c1f4.bda66"]]},{"id":"87d914a3.62cc7","type":"function","z":"4f52e314.3dc974","name":"Build request","func":"msg.headers = {'X-Api-Key': env.get(\"api\")}\nlet request = msg.request || env.get(\"request\")\nmsg.url = `${env.get(\"url\")}/api/${request}`\nreturn msg\n","outputs":1,"noerr":0,"x":166,"y":48,"wires":[["561a7887.6639c"]]},{"id":"ff32c862.5e7ee","type":"json","z":"4f52e314.3dc974","name":"","property":"payload","action":"","pretty":false,"x":390,"y":120,"wires":[[]]},{"id":"233f22ca.e7400e","type":"comment","z":"4f52e314.3dc974","name":"OK","info":"","x":629,"y":97,"wires":[]},{"id":"72ca6601.e96f1","type":"comment","z":"4f52e314.3dc974","name":"Error","info":"","x":636,"y":263,"wires":[]},{"id":"3e677f54.d2d6a8","type":"catch","z":"4f52e314.3dc974","name":"","scope":null,"uncaught":false,"x":380,"y":220,"wires":[[]]},{"id":"c579c1f4.bda66","type":"switch","z":"4f52e314.3dc974","name":"","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"eq","v":"204","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":90,"y":160,"wires":[["ff32c862.5e7ee"],[],[]]},{"id":"7183d903.1ec4b8","type":"subflow:4f52e314.3dc974","z":"192e771b.93cec9","name":"","env":[{"name":"url","value":"your_ip:5000","type":"str"},{"name":"api","value":"put key here","type":"str"},{"name":"request","value":"connection","type":"str"}],"x":560,"y":260,"wires":[["102e244.10a7fdc"],["cbfd690.4ff3418"]]},{"id":"102e244.10a7fdc","type":"debug","z":"192e771b.93cec9","name":"op1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":200,"wires":[]},{"id":"cbfd690.4ff3418","type":"debug","z":"192e771b.93cec9","name":"op2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":320,"wires":[]},{"id":"e7904c21.ef3b88","type":"function","z":"192e771b.93cec9","name":"Raise 5 and Home","func":"msg.request = \"printer/printhead\"\nmsg.payload = {\n command: \"jog\",\n z: 5,\n speed: 300\n}\nnode.send(msg)\nmsg2 = {\n request: \"printer/printhead\",\n payload: {\n command: \"home\",\n axes: [ \"x\", \"y\", \"z\" ]\n }\n}\nnode.send(msg2)\nreturn","outputs":1,"noerr":0,"x":330,"y":180,"wires":[["7183d903.1ec4b8"]]},{"id":"a1b57e73.a3d248","type":"function","z":"192e771b.93cec9","name":"Heat Extruder","func":"msg.request = \"printer/tool\"\nmsg.payload = {\n command: \"target\",\n targets: {tool0: 180}\n}\nreturn msg","outputs":1,"noerr":0,"x":320,"y":220,"wires":[["7183d903.1ec4b8"]]},{"id":"9f093217.eb1448","type":"function","z":"192e771b.93cec9","name":"Cool down","func":"msg.request = \"printer/tool\"\nmsg.payload = {\n command: \"target\",\n targets: {tool0: 0}\n}\nnode.send(msg)\nmsg2 = {}\nmsg2.request = \"printer/bed\"\nmsg2.payload = {\n command: \"target\",\n target: 0\n}\nnode.send(msg2)\nreturn","outputs":1,"noerr":0,"x":310,"y":300,"wires":[["7183d903.1ec4b8"]]},{"id":"3e2f8571.59f3a2","type":"function","z":"192e771b.93cec9","name":"Squirt","func":"msg.request = \"printer/tool\"\nmsg.payload = {\n command: \"extrude\",\n amount: 5\n}\nreturn msg","outputs":1,"noerr":0,"x":290,"y":340,"wires":[["7183d903.1ec4b8"]]}]