first draft, issue #1
This commit is contained in:
parent
893f0ea7b6
commit
a479d7e61e
2
.gitignore
vendored
2
.gitignore
vendored
@ -130,3 +130,5 @@ dist
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
# Author Added
|
||||
.APIkey
|
25
index.js
Normal file
25
index.js
Normal 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);
|
Loading…
x
Reference in New Issue
Block a user