const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/v1/service/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
const data = { name: 'ServiceName' };
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});