JSFiddle - React, Tailwind, and code Playground
by tjnicolaides
JavaScript
$('.success').each(function() {
// grab the UUID data attribute of each list item with the .success class
var uuid = $(this).attr('data-uuid');
var properties = {
data: {
'type': 'maintenancetask',
'uuid': uuid
}
};
//create the entity object
var entity = new Apigee.Entity(properties);
//call destroy() to initiate the API DELETE request
entity.destroy(function (error) {
if (error) {
// Error
} else {
// Success
}
}).remove();