\datasets\query

Description
Use this endpoint to query datasets using SQL. For more information about queries, read the query documentation.
URL Structure
https://api.vay.studio/datasets/sources
Method
POST
Body
query
The SQL query to run.

{
    "query": "select * from vay.`chicago/crimes-one-year-prior-to-present/rows.csv` limit 5"
}
                
Headers
X-Auth-Token
Required. Your API Key.
Returns
result[i].columns String[]
The columns returned by the query.
result[i].rows Object[]
The rows returned by the query.
result[i].errorMessage String
Optional SQL execution error. Will be "" if no error is present.

{
    "errorCode": 0,
    "error": "",
    "result": {
        "columns": [
            "CASE_",
            "DATE__OF_OCCURRENCE",
            "BLOCK",
            "IUCR",
            "PRIMARY_DESCRIPTION",
            "SECONDARY_DESCRIPTION",
            "LOCATION_DESCRIPTION",
            "ARREST",
            "DOMESTIC",
            "BEAT",
            "WARD",
            "FBI_CD",
            "X_COORDINATE",
            "Y_COORDINATE",
            "LATITUDE",
            "LONGITUDE",
            "LOCATION"
        ],
        "rows": [
            {
                "ARREST": "N",
                "BEAT": "131",
                "BLOCK": "019XX S WABASH AVE",
                "CASE_": "JD130894",
                "DATE__OF_OCCURRENCE": "01/17/2020 11:15:00 PM",
                "DOMESTIC": "N",
                "FBI_CD": "06",
                "IUCR": "0820",
                "LATITUDE": "",
                "LOCATION": "",
                "LOCATION_DESCRIPTION": "APARTMENT",
                "LONGITUDE": "",
                "PRIMARY_DESCRIPTION": "THEFT",
                "SECONDARY_DESCRIPTION": "$500 AND UNDER",
                "WARD": "3",
                "X_COORDINATE": "",
                "Y_COORDINATE": ""
            },
            {
                "ARREST": "N",
                "BEAT": "214",
                "BLOCK": "041XX S DREXEL BLVD",
                "CASE_": "JC320782",
                "DATE__OF_OCCURRENCE": "06/24/2019 06:20:00 PM",
                "DOMESTIC": "N",
                "FBI_CD": "06",
                "IUCR": "0820",
                "LATITUDE": "",
                "LOCATION": "",
                "LOCATION_DESCRIPTION": "RESIDENTIAL YARD (FRONT/BACK)",
                "LONGITUDE": "",
                "PRIMARY_DESCRIPTION": "THEFT",
                "SECONDARY_DESCRIPTION": "$500 AND UNDER",
                "WARD": "4",
                "X_COORDINATE": "",
                "Y_COORDINATE": ""
            },
            {
                "ARREST": "N",
                "BEAT": "1924",
                "BLOCK": "032XX N CLARK ST",
                "CASE_": "JC497784",
                "DATE__OF_OCCURRENCE": "11/03/2019 11:40:00 AM",
                "DOMESTIC": "N",
                "FBI_CD": "06",
                "IUCR": "0860",
                "LATITUDE": "",
                "LOCATION": "",
                "LOCATION_DESCRIPTION": "DEPARTMENT STORE",
                "LONGITUDE": "",
                "PRIMARY_DESCRIPTION": "THEFT",
                "SECONDARY_DESCRIPTION": "RETAIL THEFT",
                "WARD": "44",
                "X_COORDINATE": "",
                "Y_COORDINATE": ""
            },
            {
                "ARREST": "N",
                "BEAT": "1234",
                "BLOCK": "018XX S WOOD ST",
                "CASE_": "JC270482",
                "DATE__OF_OCCURRENCE": "05/19/2019 11:00:00 AM",
                "DOMESTIC": "N",
                "FBI_CD": "11",
                "IUCR": "1152",
                "LATITUDE": "",
                "LOCATION": "",
                "LOCATION_DESCRIPTION": "ATM (AUTOMATIC TELLER MACHINE)",
                "LONGITUDE": "",
                "PRIMARY_DESCRIPTION": "DECEPTIVE PRACTICE",
                "SECONDARY_DESCRIPTION": "ILLEGAL USE CASH CARD",
                "WARD": "25",
                "X_COORDINATE": "",
                "Y_COORDINATE": ""
            },
            {
                "ARREST": "N",
                "BEAT": "122",
                "BLOCK": "004XX S LA SALLE ST",
                "CASE_": "JC459410",
                "DATE__OF_OCCURRENCE": "10/04/2019 06:10:00 AM",
                "DOMESTIC": "N",
                "FBI_CD": "08A",
                "IUCR": "0560",
                "LATITUDE": "",
                "LOCATION": "",
                "LOCATION_DESCRIPTION": "SIDEWALK",
                "LONGITUDE": "",
                "PRIMARY_DESCRIPTION": "ASSAULT",
                "SECONDARY_DESCRIPTION": "SIMPLE",
                "WARD": "4",
                "X_COORDINATE": "",
                "Y_COORDINATE": ""
            }
        ],
        "errorMessage": ""
    }
}
            
vay logo

© Copyright 2019 Vay Technologies LLC.
All rights reserved.