API_DoQuery vs a report

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • In Progress
I was reading the description of the API_DoQuery and its uses but can someone give me a use case for using it over a report? I feel like its functionality can be accomplished without having to write anything just by creating a report and using filters.
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
Typically it would be used in a website to query Quick Base or in some other interface to another software system.
Jordan, if you just need to retrieve and display information for end users, then in most cases a report works fine. The DoQuery call is used a lot to integrate an app with a third-party service or to process records and create, update, or delete records in other tables based on a record set.

To give one example, I use API_DoQuery with clients who need a visual user interface (spatial, geographic) that isn't possible within the native Quick Base UI. API_DoQuery allows records to be retrieved and processed on the server and then displayed visually in the browser. Changes made using the custom UI result in records being created, updated, or deleted in the app.
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
Another use case is I recently built out a custom page that was a few tables of reports. However each cell was basically its own report so basically I created an object of queries and a function that runs all the queries and populates each cell.
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb
So while working within Quickbase the use of reports is fine. Though, If I was to build a custom HTML page or want to do a POST request to third party software, then I would use the API_DoQuery?
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,958 Points 1k badge 2x thumb
That's what I would recommend. You could query for anything without having to be constrained by relationships then take that data and send a post to wherever as json, csv, or xml. Can reach out directly if you want help with this.
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb
Reaching out directly would help a lot! Is there somewhere I can find your contact info?
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,958 Points 1k badge 2x thumb
21.co/chuck and will respond with email address.