Support

Account

Home Forums General Issues How can I retrieve fields from an options page using the REST API (v5.11)? Reply To: How can I retrieve fields from an options page using the REST API (v5.11)?

  • 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
    });