Bouquet API Demo

We created a simple project using Amazon sampleĀ TICKIT database and saved a set of Bouquet Bookmarks to analyze sales and events.

You'll access our Bouquet demo server as a guest user without explicit authentication (through an API-key).


This short script aims at showing the basics of Bouquet API using our tiny Javascript client.

What's in here?

When run, this script

  1. Authenticates to our Bouquet demo server using a scoped "guest" APIKey
  2. Queries the sample "Tickit" data-set showing 3 different output types of the same analysis
    • SQL view that gives the SQL query generated by our in-database engine
    • JSON view that gives the raw results of the query as a JSON object
    • Chart view that displays results of the query as a Chart

Going further

For the sake of simplicity, only Bouquet relevant code is shown here. To view the full version, check it here.

To learn more about Bouquet check the API documentation and give Bouquet a try!

run info

var query = {
    path : "/analytics/@'5899bc6715abcc6bed69d766'.@bookmark:'58a5dc6b45d778b2bdb231c9'/query",
    data : {
        timeframe: ["2008-01-01","2008-12-31"],
          "to_date(__PERIOD) as 'period'",
          "'Event >  Category >  Catname' as 'series'"
          "'Total quantity sold'"
        limit: 1000

var bouquetAPI = new Bouquet({
    url : '//',
    clientId : 'api-key-client',
    apiKey : 'eyJhbGciOiJSUzI1...ytR68CGURskRM2D0VPQ'

// API Request 1 - SQL
bouquetAPI.request(query, {data : 'SQL'}).then(function(response) {

// API Request 2 - JSON
bouquetAPI.request(query).then(function(response) {

// API Request 3 - Chart
bouquetAPI.request(query, {envelope : 'data',data : 'RECORDS'}).then(function(response) {
API Request 1 SQL
API Request 2 JSON
API Request 3 Chart

A real time interactive D3.js US map that shows the number of events per state. Zero SQL code needed!

An area chart build with HighCharts.js showing the number of ticket sold by type of events.

An API quick integration with the VegaLite datavizualisaton library. Here a barchart to follow remaining tickets by event.

This is a Vega-Lite specification using the API to build a timeserie that shows the evolution of ticket selling in a year.

A very simple interactive table that shows a summary of ticket sold, regarding the event. Still no SQL needed.

The Open Bouquet in-database analytics engine generates dynamic SQL that you can easily reuse.

The API allows you to select exactly the content and format of the output, so you can integrate the result with minimal transformation.

The API also allows you to export a complete dataset in CSV or Excel format.