Get your monthly bandwidth usage with TekSavvy ISP

This flow will get your monthly data usage for your TekSavvy account. You need to send your API key as the payload.

[{"id":"63afb891.9c5048","type":"subflow","name":"TekSavvy","in":[{"x":39,"y":80,"wires":[{"id":"ba1fae47.45e05"}]}],"out":[{"x":745,"y":80,"wires":[{"id":"3cc7d035.c3383","port":0}]}]},{"id":"4678e5bf.b9871c","type":"http request","name":"","method":"GET","url":"https://api.teksavvy.com/web/Usage/UsageSummaryRecords?$filter=IsCurrent%20eq%20true","x":311,"y":80,"z":"63afb891.9c5048","wires":[["9b7d2312.6482e"]]},{"id":"ba1fae47.45e05","type":"function","name":"Auth","func":"api_key = msg.payload;\n\nmsg.headers = {\"TekSavvy-APIKey\": api_key}\nreturn msg;","outputs":1,"x":158,"y":80,"z":"63afb891.9c5048","wires":[["4678e5bf.b9871c"]]},{"id":"3cc7d035.c3383","type":"function","name":"Get download","func":"msg.payload = msg.payload.value[0].OnPeakDownload;\n\nreturn msg;","outputs":1,"x":612.0000076293945,"y":79.50000286102295,"z":"63afb891.9c5048","wires":[[]]},{"id":"9b7d2312.6482e","type":"json","name":"","x":462,"y":80,"z":"63afb891.9c5048","wires":[["3cc7d035.c3383"]]},{"id":"53561dea.aca9e4","type":"debug","name":"","active":true,"console":"false","complete":"false","x":588,"y":60,"z":"56f57709.a90a88","wires":[]},{"id":"be227bbc.41dd88","type":"subflow:63afb891.9c5048","x":375,"y":60,"z":"56f57709.a90a88","wires":[["53561dea.aca9e4"]]},{"id":"bff32023.400ce","type":"inject","name":"","topic":"","payload":"YOUR_API_KEY_HERE","payloadType":"string","repeat":"","crontab":"","once":false,"x":161.5,"y":60,"z":"56f57709.a90a88","wires":[["be227bbc.41dd88"]]}]
natcl

Flow Info

created 2 years, 10 months ago

Node Types

Core
  • debug (x1)
  • function (x2)
  • http request (x1)
  • inject (x1)
  • json (x1)
Other
  • subflow (x1)
  • subflow:63afb891.9c5048 (x1)

Tags

  • TekSavvy
  • ISP
  • Bandwith
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option