Skip to main content
Question

Retrieving All Application Pages by API - How?

  • October 20, 2017
  • 0 replies
  • 117 views

Looking for an API or figuring out a process by APIs to grab all the pages in an application (especially the code pages).  I've used the API_GetSchema to grab the application level and table levels. The table schema seems to have everything I need in it, but the application schema is very bare. 

I didn't realize the pages were excluded from the schema pull of the application.  I see there is an API call for getting a specific page, API_GetDBPage, but that works only if you know the page ids beforehand

Is there an API that will show all the pages ids for an application, or get all pages?
This topic has been closed for replies.

  • Registered
  • October 20, 2017
Just make you own API. On the page ?a=AppDBPages there is a global variable QuickBase uses for the Model named input.modelData. Just load this page into a hidden <iframe> and when it fully loads reach into the <iframe> and grab this global variable:
var url = "https://SUBDOMAIN.quickbase.com/db/APPDBID?a=AppDBPages";
$("body").append($('<iframe id="QBU_iframe" style="display:none"></iframe>'));
$("#QBU_iframe").attr("src", url);
$("#QBU_iframe").load(function () {
  var pages = document.getElementById("QBU_iframe").contentWindow.input.modelData;
  console.log(JSON.stringify(pages, null, "  "));
});
You will get pages as an object with this structure:
[{
    "name": "secret.html",
    "type": "Text",
    "id": 6,
    "specific": ""
  },
  {
    "name": "module.js",
    "type": "Text",
    "id": 7,
    "specific": ""
  }
]

Don't be hemmed in by the official API. The internet is your API plaything.



  • Registered
  • October 20, 2017
I have to ask.... 
Why?