ContributionsMost RecentMost LikesSolutionsRe: Uncaught TypeError: JSON.Stringify is not a functionHi Neil, I figured it out after a response from QuickBase support. The 'data' key in the fetch() method should be 'body' not 'data' now it works great! I tried with and without the Content-Length header and both ways are working. Thanks for your help! ------------------------------ Christopher Wheatley ------------------------------ Re: Uncaught TypeError: JSON.Stringify is not a functionNeil, I did. The top section is now like below. Info in {XXXXXX} does contain the real values in the code page, I've obscured them here for security: var body = {"from":"{XXXXXXXX}","select":[20,22,23,24,25,29,31,33],"where":"{'6'.Ex.'Yes'}AND{'20'.Ex.'New York'}"}; var headers = { 'QB-Realm-Hostname': '{XXXXXXXX}', 'Authorization': 'QB-USER-TOKEN {XXXXXXXX}', 'Content-Length': body.length, 'Content-Type': 'application/json' } ------------------------------ Christopher Wheatley ------------------------------ Re: Uncaught TypeError: JSON.Stringify is not a functionThanks, Neil! I've updated the code and now I'm getting a 400 error: "https://api.quickbase.com/v1/records/query 400 (Bad Request)" I've reached out to QuickBase support, hopefully they can help. The original code came from their API guide so they're now aware of the typo. Best, Chris ------------------------------ Christopher Wheatley ------------------------------ Uncaught TypeError: JSON.Stringify is not a functionHello, I'm trying to utilize the new REST API and am getting an error when I call the below script, which I've put in a code page. Am I missing something simple here? --- var headers = { 'QB-Realm-Hostname': '{OUR REALM}', 'Authorization': 'QB-USER-TOKEN {MY USER TOKEN}', 'Content-Type': 'application/json' } var body = { "from": "{MY TABLE}", "select": [ 20, 22, 23, 24, 25, 29, 31, 33 ], "where": "{'6'.Ex.'Yes'}AND{'20'.Ex.'New York'}" } fetch('https://api.quickbase.com/v1/records/query', { method: 'POST', headers: headers, data: JSON.Stringify(body) }) .then(res => { if (res.ok) { return res.json().then(res => console.log(res)); } return Promise.reject({ status: res.status, statusText: res.statusText }); }) .catch(err => console.log(err)) --- ------------------------------ Christopher Wheatley ------------------------------ Re: Pass value to your custom code pageIn this conversation kRid mentioned as a very solid approach to getting the Record ID of the page you're on. https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=fa0d4684-eb02-4a5d-a1c4-58ca35305b09&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer Hope that helps (although you've probably solved this issue long ago). ------------------------------ Christopher Wheatley ------------------------------ Re: Export Field Properties of a table into a CSV fileThanks, Austin. I'm hoping for a native solution; but, it looks like Pipelines might get me there. The API_GetSchema call provides all the info I'm interested in on the Field Properties side, so it's just a matter of iterating over the response and getting the data where I need it to be. ------------------------------ Christopher Wheatley ------------------------------ Export Field Properties of a table into a CSV fileIs this possible? We have tables for which we would like to take a snapshot of some field properties, like the Formulas in Formula-type fields. As our analysis methodologies evolve, we need to know how to recreate results from past iterations of our models. Ideally, the output would be a CSV file like below: fieldNameA, fieldNameB, ..., fieldNameN fieldIdA, fieldIdB, ..., fieldIdN fieldTypeA, fieldTypeB, ..., fieldTypeN fieldFormulaA, fieldFormulaB, ..., fieldFormulaN (if applicable) Record 1 Record 2 . . Record n Thanks! ------------------------------ Christopher Wheatley ------------------------------