Discussions

 View Only
  • 1.  Uploading HTML to QuickBase with REST API

    Posted 01-08-2021 04:37
    Hi guys,

    I am producing some Plotly charts and reports in Python by pulling raw data from QuickBase with the REST API. I would like to return the output (the reports and charts) to QuickBase so they can be displayed in pages. I can produce the output in HTML format in Python which I know can be displayed in a code page on QuickBase but I really don't have an idea on how to make the Python script update the HTML code within the page when a new run of the report is created. Manually pasting the HTML code everytime in the page is not really an option as I have a number of charts and reports with high update frequency. 

    If you have any ideas, please share. It doesn't have to be a direct update to the page, if that needs to go through a QB table field and then the code page to somehow read the content of the field, that's also fine.

    As a last resort, I can export the reports/charts as images and somehow get them onto QuickBase, which I am not sure how to do best either. However, this approach will make the charts static, without ability to use filters and drilldowns. 

    Any help will be greatly appreciated!

    Regards,

    Yordan

    ------------------------------
    Yordan Petrov
    ------------------------------


  • 2.  RE: Uploading HTML to QuickBase with REST API

    Posted 01-08-2021 11:56
    There's an older XML API endpoint that can add/update pages https://help.quickbase.com/api-guide/add_replace_dbpage.html.  I think this would work well in your situation, you'd just have to change the way you make requests to this specific endpoint to match the XML requirements.  You can still use user tokens for most of these older XML APIs by passing it in a "usertoken" tag so you shouldn't need to authenticate differently.

    Some people have used this to make deployment tools for code pages in the past.  I haven't used this personally, but looking at the code might be helpful https://github.com/cullenjett/quickbase-cli.

    ------------------------------
    Nathan Hawe
    ------------------------------



  • 3.  RE: Uploading HTML to QuickBase with REST API

    Posted 01-09-2021 09:42
    Thanks for the links Nathan, I will give this a go and let you know how it worked.
    Just FYI, there are "." at the end of the URLs you shared so those have to be removed in order to open the links.

    Regards,

    Yordan

    ------------------------------
    Yordan Petrov
    ------------------------------



  • 4.  RE: Uploading HTML to QuickBase with REST API

    Posted 01-11-2021 04:24
    Hi Nathan,

    Worked like a charm. Thank you very much for the idea!

    Regards,

    Yordan

    ------------------------------
    Yordan Petrov
    ------------------------------



  • 5.  RE: Uploading HTML to QuickBase with REST API

    Posted 01-09-2021 16:38
    Yordan,

    I am not familiar with Plotly but spent a couple minutes on their Intro Page
    https://dash.plotly.com/introduction

    It explicitly says that Dash app are rendered in the browser and can then be shared through URLs.   Have you tried to put one of these into the dashboard of Quick Base?  I have a customer that uses the commodity feeds from CNBC and they are imbedded into Quick Base with the Web Page widget feature.



    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------



  • 6.  RE: Uploading HTML to QuickBase with REST API

    Posted 01-10-2021 04:06
    Hi Don,

    That's correct and very easy to implement, however the community (free) edition of Dash allows you to only store graphs publicly which is not an option for my customer and neither is paying for the enterprise edition. That's why I will try to use the legacy XML API as Nathan suggested and see how it goes.

    Thanks a lot for spending time on this topic!
    I will let you guys know how it worked out.

    Regards,

    ------------------------------
    Yordan Petrov
    ------------------------------