Added amplify.js version of API call