Does anyone have best practices on how to inspect and debug API calls with the API plugin?
I have built an API plugin and the first step is to check with the other service if data already exists. I want to continue the workflow based on the response. In order to properly do that, I need to be able to firstly inspect the response to then try and handle it.
Does anyone have a good way to do this?
Thanks @Sarah_Esteve
Not quite what I meant though. I had to manipulate the data before giving it in by splitting the text string. So I needed to debug it to see what’s going in and out. But there is no way to log the response from the API when used in a workflow as far as I know.
No.
I was simply using the API connector to connect to another service.
Let me give some more context…
I have to hand over firstname and lastname to the API input.
However, I store names as a single name string in the DB.
So, I have to manipulate the data before giving it to the API input and wanted to check how to best do that.
Current Solution:
I used the “split by…” operator now. I take the :first_item as firstname and last_item as lastname.
This is not ideal though because I can’t do any proper checks of the string.
Examples:
Someone has a double name…
Someone has used an emoji in their name on the site where I scrape the data from…
@umit1 you can use console.log() for server side actions, and you should be able to get some visibility from the API calls using the following options in Server Logs. You will need to click ‘Show Advanced’ to surface them.