How to get the Qid of the reports present in a table through API?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

Hi,

I want to fetch all the reports of all type through api. So i want to know the qid of each report. Is there any way to get the qid of the reports through any API?

Photo of Geetanjali

Geetanjali

  • 42 Points

Posted 4 years ago

  • 0
  • 1
Photo of Eric

Eric

  • 40 Points
When you run the API_GetSchema command against the table's DBID as documented here: http://www.quickbase.com/api-guide/index.html#getschema.html it will return the qid parameters on that table and their settings in an XML response.
Photo of Geetanjali

Geetanjali

  • 42 Points
Thanks Eric for your reply.But it is displaying only common reports. Is there any way to get the personal reports too?
Photo of Eric

Eric

  • 40 Points
The API will only return details about common reports. In order to see personal reports, within your application click Home->Settings->App Management->Manage Reports. Here you can see the table each report is used on, what type of report it is, if it's a common or personal report, when it was last used, how often it was used, and what the report ID is. Each of these columns are also an option to click on to sort the data by that item.
Photo of Geetanjali

Geetanjali

  • 42 Points
Ok. But i was looking for an API which will help me to know the common report Qid too after authenticating my login.
Thanks a lot.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,074 Points 20k badge 2x thumb
Although there is no published API method that will return personal reports it is simple enough to create such a method.

Consider for example gathering the information for two personal reports I have in the Formula Functions Reference application (see screenshot). The following JavaScript code loads the following page into a hidden <iframe> and grabs the global variable gPageBarReportTrayData which contains various information associated with the personal reports and logs it to the console.

Formula Functions Reference Home
https://www.quickbase.com/db/6ewwzuuj?a=td

Here is the code that is used in this example:

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=446

Notes:

(1) This technique is perfectly general - any scrap of information contained within a QuickBase page can be obtained through an AJAX call and some form of access or parsing action. By packaging the procedure as a function named QBU_GetPersonalReports that returns a promise, an object containing the personal report information is made available when the promise resolves.