QuickBase SDKs Now on GitHub

GitHub logoAs most of you are aware, QuickBase has maintained its Software Development Kits (SDKs) at Code.Intuit.com for a few years now. These are mostly language-specific wrappers for the QuickBase HTTP APIs. We have SDKs for JAVA, JavaScript, Perl, PHP, Visual Basic, C# and Ruby.

There has been an Intuit-wide initiative to move to public code repositories such as GitHub. As part of this initiative, Code.Intuit is being de-commissioned. In addition to being a popular and modern repository, GitHub will offer the QuickBase developer community an ability to contribute updates easily.

QuickBase SDKs are now maintained on GitHub.

It is a public repository and QuickBase does NOT claim ownership or rights. These SDKs will continue to be licensed under the Creative Commons attribution.

I encourage developers to contribute to the repository and make it even richer than it is today.

You now have the option to subscribe to QuickBase-only content here.

Ram Shamanna

Ram is a Sr. Product Manager at Intuit QuickBase. He tends to ask "why" five times.

More Posts

  • gareth
  • Surya Avantsa
  • djangoQuickbase

    Python please!

    [Reply]

    Tom Renish Reply:

    Not exactly an SDK, but this is a foundational example for working with QB data in Python using the QB APIs via HTTP request.

    This example adds a record to a table, no content in this particular example. To add content within the “API_Addrecord” function, reference QB’s docs.
    ———-

    ‘This is the notably bad way to do it. Naturally, your script would leverage inputs to be held in variables.

    import urllib2

    from xml.etree.ElementTree import XML

    url =
    ‘https://randomquickbaseaccount.quickbase.com/db/main?act=API_Authenticate&username=MyUserName&password=MyPassword’

    response = urllib2.urlopen(url).read()

    myTicket = XML(response).find(“ticket”).text

    print myTicket

    url =
    ‘https://teslamotorsquickbaseaccount.quickbase.com/db/bh4zjkwrn?act=API_AddRecord&apptoken=bw6zwaxca695t5ddtund5bn8s5st&ticket=’
    + myTicket

    response = urllib2.urlopen(url).read()

    print response

    recordID = XML(response).find(“rid”).text

    print recordID

    ————–

    As commented above, variables for referencing table names would be strongly preferred.

    Off the top of my head, it would be something more like this:

    ‘make a function:

    def function WriteQB(parm1, parm2, parm3, parmn)

    ‘declare your variables up front and then make it into a function.

    Apptoken = ‘bw6zwaxca695t5ddtund5bn8s5st’

    tableID=’bh4zjkwrn’

    Myusername =SomeFormula (you could obscure by reading from a separate file that nobody else is permitted to see, or put in a real value)

    Mypassword =SomeFormula1 (you could obscure by reading from a separate file that nobody else is permitted to see, or put in a real value)

    fieldID1 = somevalue1
    fieldID2 = somevalue2
    fieldID3 = somevalue3
    fieldIDn = somevalue4

    ‘define a URL string
    url = ‘https://randomquickbaseaccount.quickbase.com/db/main?act=API_Authenticate&username=’
    + Myusername + ‘& password=’ + Mypassword etc…

    ‘and then call your function:

    WriteQB(val1, val2, val3, valn)

    And then you’re just pumping values into a list.

    Credit where it’s due: my coworker David tossed together the prelim Python code at the top, and I broke it down into something more modular.

    Here’s a link to the API_AddRecord: http://www.quickbase.com/api-guide/index.html#add_record.html

    And here’s the relevant part where it shows what a couple fields added in Intuit’s example:

    URL alternative

    https:///db/57pa5vjf?act=API_AddRecord&_fnm_second_year=1776&_fid_8=changed&ticket=&apptoken=dtmd897bfsw85bb6bneceb6wnze3

    They are writing to a couple fields, once by referencing the fieldname and once by referencing field ID.

    The example on the link above makes it look like writing an XML request is cleaner, but I don’t have any experience with that yet. Of course, stackoverflow has everything:

    http://stackoverflow.com/questions/4469983/generating-xml-in-python-and-lxml

    [Reply]

    Tom Renish Reply:

    Or, check this out:

    https://github.com/oysterhotels/quickbase

    I had forgotten that I found the link above a few weeks ago, and never had a chance to play with the functions this guy made. The code looks very promising.

    [Reply]

    Kevin Seelbach Reply:

    I’ve recently published a Python module for interacting with the QuickBase API’s. It’s based off of the module Tom liked to (Oyster Hotels), but I’ve expanded it quite a bit and added many extra features. FWIW, I’ve been using it exclusively within Django.

    http://kevinseelbach.github.io/pyQuickBase/

    https://pypi.python.org/pypi/pyquickbase/0.2.2

    [Reply]

    Gene Ricky Shaw Reply:

    Are there any good explanations for the API? I’m decent with python but I don’t get the QB API at all. I see some documentation asking for ticket numbers – what if you don’t use QB for tickets? How do I get the table set up or the entire listing of a table? I can use the Oyster Hotels module to successfully connect, but then I can’t do anything else. Can you point me to some documentation?

    [Reply]

    Kevin Seelbach Reply:

    I have not had time to write documentation, and am not working much with QuickBase currently, but there are some tests here that show how to perform do_query and how to retrieve the table schema. https://github.com/kevinseelbach/pyQuickBase/blob/master/tests/tests.py

    It’s pretty simple to use. You just create the client (see setUpClass) passing in your app or table dbid, username, password, base_url and token. Then you can do records = client.do_query(“{’3′.XEX.”}”, columns=['a'], database=’XXXXX’)
    for record in records:
    print record
    ### or you can retrieve by the fid
    print record['3'] (or any other field number in your table)

    I generally work with structured data, so I haven’t tested the using field names much, but they should work as well.

    Gene Ricky Shaw Reply:

    Thanks for the info! I’ll try that again when I’m at the office.

    sibyl Reply:

    Hi — The “ticket” reference was to the QuickBase authentication ticket (basically, how QuickBase knows who’s logged in). The ticket is returned from an API_Authenticate call (which Kevin may also have included in his Python module). See http://www.quickbase.com/api-guide/index.html#authenticate.html and http://www.quickbase.com/api-guide/index.html#authentication_and_secure_access.html for more info.

    Gene Ricky Shaw Reply:

    Thank you, I will try that again when I’m at work.

  • Where is Ruby?

    What happened to the Ruby SDK?

    [Reply]