Forum Discussion

Re: Pipeline JSON Schema Samples

Hi Paul,

The JSON Schema Sample should be an example of a single row or object from the JSON data you want to iterate over. To find a good sample, you'll need to call the API you're working with outside of Pipelines first - like with Postman. Or, when using Quick Base's new RESTful API, you can make calls directly from our API Portal (https://developer.quickbase.com/).

Specifically how much of your JSON you will need to copy and paste as the schema sample depends on the structure of the JSON data you're working with. But keep in mind that Pipelines allows you to navigate to a specific part of a piece of JSON data so you only need a sample from the portion of your JSON data you will be iterating over.

For example, I grabbed a copy of the Complete Project Manager app from the exchange. I want to use the QB RESTful API to run the Active Projects table report, then iterate over the results so I can work with each individual row in Pipelines. To do that, I try out the call in the API Portal linked above. I see that the JSON response has three portions: data, fields, and metadata. I only want the data, which contains the records for that report. I indicate this by entering "/data" as the JSON Records Path.

When I make the call in the API Portal, I then start highlighting the text under the data section, until I see that I've reached the end of the first record. I can see that when the field IDs start to repeat. For this example, my JSON Schema sample would be:

{
"16": {
"value": "Customer Service System Update"
},
"23": {
"value": "2017-05-06"
},
"24": {
"value": "2017-07-11"
},
"27": {
"value": "High"
},
"28": {
"value": "In-Progress"
},
"34": {
"value": "https://team.quickbase.com/db/bqkcuvjtg?act=API_GenAddRecordForm&_fid_48=6&_fid_8=05-06-2017&z=h"
},
"81": {
"value": "<img src=\"https://images.quickbase.com/si/16/227-rect_red.png\" title=\"Project Overdue\">"
},
"82": {
"value": 12
},
"97": {
"value": {
"email": "albercruz@example.com",
"id": "1002.czm8",
"name": "a456123"
}
},
"103": {
"value": "Acme Staple Company"
},
"130": {
"value": "javascript:void(copyMasterDetailButtonHandler('&copyFid=16&destrid=0&sourcerid=6', 'bqkcuvjta'))"
}
}

------------------------------
Brian Cafferelli
------------------------------
No RepliesBe the first to reply