First of all you need to Download cDataSet.xlsm and go to the scriptDBCom module, where you’ll find various examples.

Readonly, no oAuth2.

To get used to the API we’ll first of all use some  of my test data in a readonly ScriptDB mode, as well as my Rest Handler. Later on you’ll create your own.

Get authenticated

We wont need to bother with oAuth2 for this, since the handler we’ll use is set up for public access, but we will need to register this app (readonly access to my restHandler)  on your PC. This is a one off exercise, for which you’ll need to run this code.
What just happened is that you’ve created an encrypted entry in your registry, called “getStarted”. In future when you need to access this  from any workbook you can simply refer to it by its name. We’ll deal with the meaning of the parameters later, but the URL refers to the Google Apps Script handler that will handle all requests associated with this registry entry, as described in Handler for cScriptDbCom requests

Data in the scriptDBPrimer library

The data in the scriptDBprimer library has been copied from two sheets in the cDataSet workbook – VBAParseData and VBAParseCustomers. This is the same data used in parse.com – nosql database for VBA and parse.com – noSQL database for GAS

Do some counts

This will show how many objects are of the VBAParseData class in the scriptDBPrimer library
And in the VBAParseCustomers library

How many customers in United States

Do some queries

Get data for customers in USA
results

Get data for a particular customer

results

Get data by unique ID

Deal with a Date

result

Check that this is really readonly access

Try to delete some records, and you wont be allowed to.
Since I have only granted readonly access in my handler to this app/url combination, then deletion should fail like this.
See more on this at An API for scriptDB, and very closely related APIS at parse.com – nosql database for VBA and parse.com – noSQL database for GAS
For help and more information join our forum, follow the blog or follow me on Twitter