SlicingDice Documentation

SlicingDice API Docs

Welcome to the SlicingDice API 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    Documentation

API keys are used for API authentication. Every database has its own API keys, you can retrieve from the databases page on SlicingDice control panel.

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

API keys must be always kept in secret, such as your password. If you suspect your API key has been leaked or stolen, simply login to your dashboard and generate a new API 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.

Master Key

The master key is the most powerful key, allowing 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 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 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


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


Custom API Key

Besides the read, write and master API keys, SlicingDice allows the creation of custom API 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 API 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 API keys as you need.

Moreover, custom API 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 API key can be one of three levels: read-write, write-only or read-only.

Important

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

Read-write Custom API Key

This custom API key level is allowed to inserting and querying, 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 API Keys:

Endpoint Function
HTTP Request Type
API Endpoint

Columns Listing

GET

/column

Data Insertion

POST

/insert

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 API Key

This custom API key level allows inserting data only to the columns configured for the specific key. Since custom API 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 API Keys:

Endpoint Function
HTTP Request Type
API Endpoint

Data Insertion

POST

/insert

Read-only custom API key

This custom API 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 API 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


Demo API Key

As described on the try before you buy page, if you still don't have a SlicingDice account, consider generating a free demo API key for yourself to use on the /test/ API endpoint in all examples present on this documentation.

Pro Tip

If you are a SlicingDice customer, you can also use any of your database's master key to insert and query data on the /test endpoint, but keep in mind that this endpoint is ephemeral and the data is constantly deleted by our platform, every hour or so.

/test endpoints accepting demo and master API keys

Endpoint Function
HTTP Request Type
API Endpoint

Database

GET

/test/database

Columns

GET
POST

/test/column

Data Insertion

POST

/test/insert

Data Querying

POST

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

Saved Queries

GET
POST
PUT
DELETE

/test/query/saved
/test/query/saved/:query_name


API Keys