first draft, issue #1

This commit is contained in:
Amos Jones 2023-07-05 10:38:12 -06:00
parent 893f0ea7b6
commit a479d7e61e
2 changed files with 27 additions and 0 deletions

2
.gitignore vendored
View File

@ -130,3 +130,5 @@ dist
.yarn/install-state.gz
.pnp.*
# Author Added
.APIkey

25
index.js Normal file
View File

@ -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);