Testing your API
Run & Debug
Last updated
Run & Debug
Last updated
You can test your API using the Run button. It can be found on the top right-hand corner of any function stack.
If you are running requests that produce large amounts of data, it can cause delays during Run & Debug. It can even cause the API Test to completely stall out if the payload is very big.
When you click Run & Debug, you are presented with a panel to fill in any inputs you have established, and an option to either Run or Debug.
Once we've clicked Run to execute the function stack, we can review the results and debug further.
Debugger - Click the Activate Debugger button to launch the debugger.
Once your function stack finishes executing, you can reset your inputs and run it again, view the result below the input panel, or quickly generate a cURL command and copy it to your clipboard to test your API externally.
Your inputs will be saved in session storage, so you can come back to the same test data later. If you close your browser or log out, the values will be lost.
Click Activate Debugger from the bottom of the Run & Debug panel to open the debugger.
Use the Stop button to pause execution.
Use the Restart button to start execution again from the beginning.
Use the Next button to move to the next step of the function stack.
Please note that all steps have already executed once you enter the debugger; the debugging experience allows you to step through each individual function to track changes and behaviors, and troubleshoot specific issues after they occur.
Breakpoints are available by clicking the Advanced Options toggle.
You can also see all of your active breakpoints listed inside of the debugger, which updates automatically as you change breakpoints in your function stack.
You can quickly enable and disable breakpoints as a whole by using the ENABLE BREAKPOINTS toggle at the top of the debugger.
Watches are available by clicking the Advanced Options toggle.
Watches are Javascript-based statements that enable custom retention or manipulation of data generated as your function stack executes.
In this example, we are running a For Each loop on some database records. For each iteration of the loop, it performs some calculation on a timestamp field, but during debugging, not having this value human readable can make understanding if everything is working as expected more difficult.
By adding the JS code below as a watcher, we can get a human readable version of the manipulated timestamps as we step through our execution.
In this example, we're calling an external API and looping through some products. As we step through execution, we want to see an updated list of each product that's being added to our database without having to go through whole JSON objects.
We can definitely just add a breakpoint to our conditional statement and check the value from the Variables section of the debugger, but adding some watches can make this data more easily visible.
By adding the two watchers listed above, we get real time monitoring of the conditional statement's expression and the product title itself, and can quickly step through each iteration of the loop to understand exactly why an item may or may not qualify.
Input - View the provided inputs used to run the function stack
Response - View the data the function stack returns, if any.
Timing - View the timing for each individual function stack step, and the data output by each function if it exists.
Click the toggle to enable additional functionality.
Copy 📄 / Add Watch - Copies the variable's current contents, or adds a variable to your Watches list
Breakpoints enable you to determine when execution of your function stack pauses while using the debugger. While the debugger is open, you can move your mouse over any of the functions in your function stack to add a breakpoint by clicking the lighter red circle that appears. When you click on this icon, it turns fully red to indicate a breakpoint has been added.