SlicingDice Documentation

SlicingDice - The All-in-One Solution Documentation

Welcome to the SlicingDice documentation. You'll find comprehensive guides and documentation to help you start working with SlicingDice as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

Types of database keys

First time checking our docs? You might want to start with the right foot by reading our Documentation Guide first.

Database keys are used to connect to a database and also for the API authentication.

There are four levels of Database keys: master, write, read and custom keys.

Every database has its own Database keys and you can retrieve them on the databases page of the SlicingDice control panel, as you can see in the image below:

Database keys explained by video

Watch this quick video below to learn more about database keys.

Security Alert

Database keys must be always kept in secret, such as your password. If you suspect your Database key has been leaked or stolen, simply login to your dashboard and generate a new Database key for your database - it will invalidate the former key. Also get in touch with us so we can help you with any further security measures.

If you simply want to use SQL, then you only need to know that:

  • Master key allows you to do everything with your database, like create and delete dimensions and columns, and also insert, delete and query data.
  • Write key allows you to insert data, but not delete columns nor query data.
  • Read key allows you to query data, but not insert, update or delete them.
  • Custom keys allows you to define very detailed permissions of what the key will be able to do, for example: only write (insert) and read (query) data from specific columns.

In the sections below we describe what kind of permission and functions can be executed using which key level. The information below is more relevant if you plan to use the SlicingDice API.


Master Key

The master key allow you to make requests to insert data, query them and even change account settings.

Endpoints accepting master key

Endpoint Function
HTTP Request Type
API Endpoint

Database

GET

/database

Columns

GET
POST

/column

Data Insertion

POST

/insert

Data Update

POST

/update

Data Deletion

POST

/delete

Data Querying

POST

/query/exists/entity
/query/count/entity/total
/query/count/entity
/query/count/event
/query/top_values
/query/aggregation
/data_extraction/result /data_extraction/score
/sql

Saved Queries

GET
POST
PUT
DELETE

/query/saved
/query/saved/:query_name


Write Key

The write key only allows creating columns and inserting data to SlicingDice. With this key, you cannot run queries or change account settings.

Endpoints accepting write key

Endpoint Function
HTTP Request Type
API Endpoint

Columns

POST

/column

Data Insertion

POST

/insert

Data Update

POST

/update

Data Deletion

POST

/delete


Read Key

The read key can be used for querying data from SlicingDice. However, it doesn't allow actions that would change the data stored, such as inserting data or changing account settings.

Endpoints accepting read key

Endpoint Function
HTTP Request Type
API Endpoint

Column Listing

GET

/column

Data Querying

POST

/query/exists/entity
/query/count/entity/total
/query/count/entity
/query/count/event
/query/top_values
/query/aggregation
/data_extraction/result /data_extraction/score

Saved Queries

GET

/query/saved/:query_name

Database

GET

/database


Custom Database Key

Besides the read, write and master Database keys, SlicingDice allows the creation of custom database keys, which can be configured to allow inserting and querying only over specific columns from a database, as determined in the control panel. For instance, you can create a custom database key allowed to work with the columns visited-pages, age and gender, but forbidden to query username and address. You can create as many custom database keys as you need.

Moreover, custom database keys can only create, execute, update and delete saved queries that were created using the very same key. Note these saved queries can only use the allowed columns.

A custom database key can be one of three levels: read-write, write-only or read-only.

Important

A Custom Database Key cannot be used with the POST /column endpoint or to create columns with auto-create parameter. Use a regular write or master Database key to create columns.

Read-write Custom Database Key

This custom database key level is allowed to insert and query data, as well as create, execute, update and delete saved queries that use allowed columns only.

The following endpoints can be used by read-write Custom Database Keys:

Endpoint Function
HTTP Request Type
API Endpoint

Columns Listing

GET

/column

Data Insertion

POST

/insert

Data Update

POST

/update

Data Deletion

POST

/delete

Data Querying

POST

/query/exists/entity
/query/count/entity/total
/query/count/entity
/query/count/event
/query/top_values
/query/aggregation
/data_extraction/result /data_extraction/score

Saved Queries

GET
POST
PUT
DELETE

/query/saved
/query/saved/:query_name

Write-only Custom Database Key

This custom database key level allows inserting data only to the columns configured for the specific key. Since custom database keys cannot be used to create columns, the POST /insert endpoint won't accept the auto-create parameter.

The following endpoints can be used by write-only Custom Database Keys:

Endpoint Function
HTTP Request Type
API Endpoint

Data Insertion

POST

/insert

Data Update

POST

/update

Data Deletion

POST

/delete

Read-only custom database key

This custom database key level allows querying and editing saved queries that uses only the allowed columns. Also, the GET /column will return only metadata from columns allowed to the key.

The following endpoints can be used by read-only Custom Database Keys:

Endpoint Function
HTTP Request Type
API Endpoint

Columns

GET

/column

Data Querying

POST

/query/exists/entity
/query/count/entity/total
/query/count/entity
/query/count/event
/query/top_values
/query/aggregation
/data_extraction/result /data_extraction/score

Saved Queries

POST
GET
PUT
DELETE

/query/saved
/query/saved/:query_name