Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

We've set up a module in ServiceNow for using authenticated QuickBase tables as a data import sources in ServiceNow. The standard HTTPS and REST modules in ServiceNow can't easily do this--they only seem to support BasicAuthbasic authentication, and the QuickBase API implements its own authentication system using an ephemeral session tokens. That means that the valid endpoint URL is periodically changing; this modification automatically maintains it for you.

...

Usage

Overview

The update set modifies ServiceNow Data Sources by adding a new data source file retrieval method labeled "QuickBase" which references exactly one "QuickBase Resource."

...

Finally, there is a scheduled job that updates the session token and URL on an hourly basis. An update to a QuickBase Resource cascades to all data sources using it.

Downloads

[note terms of LICENSE]

Attachments
patterns.*xml

Related Documentation

...

There is an update set and a scheduled job.

  1. Download and install the update set (see the relevant wiki article)
  2. Download and install the scheduled job (see the relevant wiki article)

At this point you should do a cursory verification of the installation:

  1. reload Reload the application navigator and look for "QuickBase Resources."
  2. look Look at the Data Source form and check that there is now a "QuickBase" file retrieval type in the dropdown.
  3. ensure Ensure there is a new Scheduled Job with "QuickBase" in the name.

...at this point, you are ready to create/modify a data source to pull data from the QB API.

...

Warning

Any data source must use XML and an appropriate XPath row marker. The QuickBase module changes to the data source form don't enforce this, so if your settings are wrong your import may not work

  1. obtain Obtain your QuickBase credentials, app token, and target DBID for the table you want to import.
  2. in In the application navigator, go to "QuickBase Resources" and create and save a new record.
  3. click Click the "Refresh Authentication Ticket" UI Action to get a ticket and build a valid URL.
  4. in your Data Source:
    • select Select "QuickBase" as the file retrieval method.
    • select Select "XML" as the data type.
    • input Input an appropriate XPath for the row marker element in the target XML (e.g. "//row").
    • select Select the appropriate QuickBase Data Source to use.
    • Save and Stay.

Creating QuickBase Resource:

Configuring a Data Source:

Ready to Load:

In a real example, the ticket would be present as well. If all goes well, the URL should contain the URL Template from the QuickBase Resource you pointed to, and you should be able to test load records from QuickBase. Then you proceed as you would with any data source: create a transform map, schedule the import, etc.

...

Internals

Database Modifications

  • QuickBase Resource table, fields, field labels, views created
  • Data Source.File retrieval method choice list modified to include "QuickBase" option

...

Script Include

  • QuickBaseAuth object: originally, just implemented implements a method for retrieving a new ticket from a set of credentials and a named target instance
    Code Block
    /**
     * returns an array containing the ticket (index 0) and any error messages (index 1)
     * prototype => getTicket: function(instance, username, password)
     */
    
    // example:
    var qa = new QuickBaseAuth();
    
    var result = qa.getTicket('mydomain.quickbase.com', 'myusername', 'mypassword');
    ticket = result[0];
    error = result[1];
    

...

  • both refresh tickets (one explicitly, one on a schedule). Ticket
  • ticket generation and scheduled refresh is hard-coded based on for one-hour tickets.

Access Control

  • QuickBase Resources only visible to admin, since there is hot data (passwords, app tokens)