abstracted rest call to callback