Retrieve data from the endpoint in JS (in my case, this is inside a Vue.js method):
fetch('/wp-json/canopy/v2/acf--colspec/')
.then(resp => {
// Yay, data!
return resp.json();
})
.then(data => {
// Do stuff
})
.catch(function() {
// Handle errors
});