diff --git a/.gitignore b/.gitignore index ceaea36..687f227 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,5 @@ dist .yarn/install-state.gz .pnp.* +# Author Added +.APIkey \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..c28a40b --- /dev/null +++ b/index.js @@ -0,0 +1,25 @@ +/*const apiKey = { + tokenID: 'test@pam!fixparsec', + secret: 'b4e53082-4891-4d36-95c6-8662bd58f2ee' +} +HTTP: POST /api2/json/nodes/{node}/qemu/{vmid}/status/reboot +url -H "Authorization: test@pam!fixparsec=b4e53082-4891-4d36-95c6-8662bd58f2ee" https://192.168.1.32:8006/api2/json/*/ + +var request = require('request'); + +var headers = { + 'Authorization': 'test@pam!fixparsec=b4e53082-4891-4d36-95c6-8662bd58f2ee' +}; + +var options = { + url: 'https://192.168.1.32:8006/api2/json/', + headers: headers +}; + +function callback(error, response, body) { + if (!error && response.statusCode == 200) { + console.log(body); + } +} + +request(options, callback); \ No newline at end of file