We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

REST and returned values

Questions and answers about Plum Fuse+

Moderators: admin, support

Post Reply
dlanders
Posts: 2
Joined: Thu Mar 09, 2017 2:48 pm

REST and returned values

Post by dlanders »

Hi,

Thanks for the opportunity to beta fuse+.

We are trying to do a simple proof of concept with a quick REST integration. It all seems to be going ok until we try to use the returned values from our endpoint. For now it is just a hard coded JSON string with a valid flag and an account balance. When I try to use the acctBal variable it hangs up. I have followed a couple examples but I cannot seem to get the returned value to be usable. Can you point us in the right direction?

Thanks!
Doug

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: REST and returned values

Post by support »

Hi Doug,

When working with REST webservices, we find using the logs the easiest way to figure out what's going on. If you click on "Logs" on the top menu, you will see a list of all past phone calls. If you click through, you can see the call's details.

For each webservice call, you can click the + icon to see even more details, like the request that was sent, and the raw response.

We took a look at your call log, and it looks like your acctBal variable is actually wrapped in an array. So you should either modify your REST webservice to directly return the object, without the additional array, or you can refer to acctBal like result_variable[0].acctBal. However, we recommend the first option for cleaner variables names.

dlanders
Posts: 2
Joined: Thu Mar 09, 2017 2:48 pm

Re: REST and returned values

Post by dlanders »

Got it! Thanks for the quick response!

Post Reply