22 lines
785 B
JavaScript
Executable File
22 lines
785 B
JavaScript
Executable File
/*const apiKey = {
|
|
tokenID: 'ajones@pam!fixparsec',
|
|
secret: 'a25f93b4-6160-4513-9b5e-9dda06ebc787'
|
|
}
|
|
HTTP: POST /api2/json/nodes/{node}/qemu/{vmid}/status/reboot
|
|
curl -H "Authorization: ajones@pam!dev=229fe029-caa5-4a35-9c5d-d74a5d0f4233" https://stor.asura.vm42.us/api2/json/nodes/pve1/qemu/109/status/reboot*/
|
|
|
|
//const https = require('https')
|
|
//const httpsAgent = new https.Agent({ rejectUnauthorized: false });
|
|
const axios = require('axios');
|
|
|
|
|
|
axios.post('https://stor.asura.vm42.us/api2/json/nodes/stor/qemu/110/status/reboot',{}, {
|
|
headers:{
|
|
"Authorization": 'PVEAPIToken=ajones@pam!dev=229fe029-caa5-4a35-9c5d-d74a5d0f4233'
|
|
}})
|
|
.then(function (response) {
|
|
console.log(response);
|
|
})
|
|
.catch(function (error) {
|
|
console.log(error);
|
|
}); |