NickMatthew
7 years agoQrew Trainee
How to I pull data from QB applications using an API URL?
Hi! I'd like to pull data from a QuickBase application into a GoogleSheet for the purpose of allowing coworkers to quickly view, edit, modify, and visualize data within their Google Drive.
There are two ways to do this from what I'm aware: using "=importXML()" within GoogleSheets, or, ideally, create a Google Script that would allow me to automate the process.
In either case, I believe I need to have a functional API URL to access the data from an app. The challenge I have, however, is that the only URL that *doesn't* produce an error is one that logs into my "main" page (and doesn't provide the data I need).
https://[companyname].quickbase.com/db/main?a=API_Authenticate&username=[xxxx]&password=[xxxx]&hours=24&API_DoQuery&fmt=structured
The repsponse I get from QuickBase:
https://[companyname].quickbase.com/db/bnxtq4n47?a=API_Authenticate&username=[XXXXX]&password=[XXXXX]&hours=24&API_DoQuery&fmt=structured
There are two ways to do this from what I'm aware: using "=importXML()" within GoogleSheets, or, ideally, create a Google Script that would allow me to automate the process.
In either case, I believe I need to have a functional API URL to access the data from an app. The challenge I have, however, is that the only URL that *doesn't* produce an error is one that logs into my "main" page (and doesn't provide the data I need).
https://[companyname].quickbase.com/db/main?a=API_Authenticate&username=[xxxx]&password=[xxxx]&hours=24&API_DoQuery&fmt=structured
The repsponse I get from QuickBase:
<qdbapi>Awesome! No error. That's great. But I'm not getting data. So let's try logging into the database/app from which I need data.
<action>API_Authenticate</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<ticket>
[XXX]
</ticket>
<userid>[XXX}</userid>
</qdbapi>
https://[companyname].quickbase.com/db/bnxtq4n47?a=API_Authenticate&username=[XXXXX]&password=[XXXXX]&hours=24&API_DoQuery&fmt=structured
<qdbapi>Hmm.... That's not great. Why doesn't API_Authenticate work for /main/ but not for the application/table from which I want to get data?
<action>API_Authenticate</action>
<errcode>5</errcode>
<errtext>No Such Operation</errtext>
<errdetail>
This operation is not defined for applications, however, the URL contained an application ID. Please check the URL.
</errdetail>