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-based SQL endpoint

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

In addition to the SQL Drivers you can also have access to our SQL Drivers using an API endpoint. Using the SlicingDice SQL this way you don't need to worry on installing any driver on your machine.

The SQL Endpoint

To use the API-based SQL you need to make requests to a specific endpoint on SlicingDice, the https://api.slicingdice.com/v1/sql endpoint. This endpoint only receives POST requests and have these required parameters:

Authorization: Your Database Key received when a new database was created or a demo Database Key;

Content-Type: The Content-Type should be application/sql.

Using the SQL Endpoint

To use the endpoint you simply need to make a request sending the required parameters showed above and a SQL statement on the body of the request. Below you can find some examples.

Insertion statement

Inserting one value to a string column (state) to one entity (Entity1).

Entities
State

Entity1

CA

$ curl -X POST https://api.slicingdice.com/v1/sql \
    -H 'Authorization: MASTER_OR_WRITE_API_KEY' \
    -H 'Content-Type: application/sql' \
    -d 'INSERT INTO default ([entity-id], state) VALUES ("Entity1", "CA");'

Query

A simple count entities query that asks how many users live on the California state.

$ curl -X POST https://api.slicingdice.com/v1/sql \
    -H 'Authorization: MASTER_OR_WRITE_API_KEY' \
    -H 'Content-Type: application/sql' \
    -d 'SELECT COUNT([entity-id]) FROM users WHERE state = 'CA';'

API-based SQL endpoint

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