When you pull data in from a REST API, it condenses it onto one line. In order to see the data like a table, a list of information needs to be supplied to the tools we use. Every API is different, and they can put the list of data anywhere they want in their response.
For Intercom, they put their list of conversations under the heading "conversations". Other APIs might put their list of orders under the heading "allOrders." There is no way for our tools to know which list of data you want to see, so we us JSON path to data to specify where the list is located within the response from the API. This article will walk you through how to do that.
For our example, we are trying to view all the conversations that have come in to us through Intercom’s API.
If we scroll along the one line of data, we find that there is a recurring string: conversations.#
The data being returned in the API has a list of conversations, all labeled with ‘conversations.’ So we need to specify that we want that list.
After you have identified what list you want, go to Data Settings in your left hand panel.
Under this header, check the box labeled Advanced options. Enter the string in the field labeled JSON path to data, then press Connect at the bottom of the page.
Once you press connect, your data should look more like the following. If you need to, you can try a few different strings until you get the data you want. The JSON path to data may be nested deeper into the original response from the REST API. For example, it could have been under “theData.conversations” (not just “conversations”). In order to return the list you want to see, you would need to put the entire string “theData.conversations” into the JSON path to data field.
Questions? Email us at email@example.com or chat in on the site.