Akkio Docs
  • Akkio Documentation
    • Akkio FAQ
  • Account and Settings
    • Team Settings
    • Organization Settings
    • Account Settings
    • Role Based Access Control
  • Demo Models
    • Demo Models
      • Lead Scoring
      • Retail Sales Forecasting
      • Predict Credit Card Fraud
      • Identify Customer Churn
  • Setting up Integrations
    • Connecting Data
    • Airtable (Beta)
    • Google Ads (Beta)
    • Google Analytics 4 (Beta)
    • Google BigQuery
    • Google BigQuery (Service Account)
    • Google Sheets
    • HubSpot (Beta)
    • MariaDB (Beta)
    • MongoDB (Beta)
    • MySQL (Beta)
    • PostgreSQL (Beta)
    • Redshift (Beta)
    • Salesforce
    • Akkio Data Chat for Slack
    • Snowflake (Username / Password) (Beta)
    • Zapier
  • Prepare your Data
    • Prepare
      • Chat Data Prep
      • Clean
      • Merge & Fuzzy Merge
      • Table View
      • Pivot View
      • Deploying Chat Data Prep
  • Explore
    • Chat Explore
    • Chart Types
  • Building a Model
    • Predict
      • Insights Report - Classification
      • Insights Report - Regression
    • Forecasting
      • Insights Report - Forecasting
    • Model Types
  • Deploying a Model
    • Deploy
      • Google BigQuery
      • Google Sheets
      • HubSpot (Beta)
      • PostgreSQL (Beta)
      • Salesforce
      • Snowflake (Beta)
      • Web App
      • Zapier
  • REPORTING AND SHARING
    • Reports
    • Dashboards
  • REST API
    • API Introduction
      • Quickstart
    • API Options
      • cURL Commands
      • Python Library
      • Node.js Library
    • API FAQ
  • Rest API (v2)
    • Documentation
Powered by GitBook
On this page
  • API Keys
  • Syntax notes
  • Datasets
  • Get Dataset(s)
  • Create Dataset
  • Add Rows To Dataset
  • Delete Dataset
  • Models
  • Make Prediction
  • Get All Models
  • Delete Model

Was this helpful?

  1. REST API
  2. API Options

cURL Commands

Access Akkio through full cURL commands

PreviousAPI OptionsNextPython Library

Last updated 1 year ago

Was this helpful?

These commands can be used directly in terminal (OSX), Command Prompt (Windows), or similar command line interfaces and built into any code environment. They require no setup or library and are the most straightforward REST API implementation.

API Keys

As noted in the code samples below, you must get your API keys and copy them into your API code. Those can be found under the at the bottom of the Akkio app.

Syntax notes

Expand each section to see what parameters must be replaced with specific values. For example, where you see 'api_key,' you must replace it with your actual API key from team settings.

Datasets

Get Dataset(s)

Get Dataset(s)

GET https://api.akkio.com/v1/datasets

Get all datasets in your organization, or optionally get a specific dataset

Query Parameters

Name
Type
Description

id

string

(Optional): If dataset ID is included, only the specific dataset is returned

api_key*

string

Your api key, accessible from https://app.akkio.com/team-settings

{
    "status": "success",
    "datasets": [
        {
            "id": "7pmPB4MXU390Bs0Axxnd",
            "name": "Telco-Customer-Churn.csv"
        },
        {
            "id": "83BxRLqOADMfgEPTZI7v",
            "name": "Historic Conversions.csv"
        },
        {
            "id": "9eEQ4Rp92y9Z6Cws4Sot",
            "name": "titanic-sheet-titanic"
        }
    ]
}
{
    "status": "success",
    "name": "titanic-sheet-titanic",
    "rows": 887,
    "fields": [
        {
            "type": "category",
            "name": "Survived"
        },
        {
            "type": "category",
            "name": "Pclass"
        },
        {
            "name": "Name",
            "type": "string"
        },
        {
            "name": "Sex",
            "type": "category"
        },
    ]
}
{
    "status": "missing or invalid API key"
}
# Example cURL to list all datasets

 curl 'https://api.akkio.com/v1/datasets?api_key=api_key_string' 
#Example cURL to list detailed information about one dataset

curl 'https://api.akkio.com/v1/datasets?api_key=api_key_string&id=id_string' 

Create Dataset

Create Dataset

POST https://api.akkio.com/v1/datasets

Creates a dataset with a given name

Request Body

Name
Type
Description

name*

string

The name of the dataset to be created

api_key*

string

Your API key, accessible from https://app.akkio.com/team-settings

{
    "status": "success",
    "dataset_id": "YOUR_DATASET_ID",
    "dataset_name": "YOUR_DATASET_NAME"
}
# Example cURL to create a new empty dataset

curl --request POST 'https://api.akkio.com/v1/datasets?name=name_string&api_key=api_key_string'

Add Rows To Dataset

Add Rows To Dataset

POST https://api.akkio.com/v1/datasets

Request Body

Name
Type
Description

rows

array

List of rows in form [{'field name 1': 'value 1', 'field name 2': 0}, {...}, ...]

id

string

The ID of the dataset to add rows to

api_key *

string

Your API key, accessible from https://app.akkio.com/team-settings

{
    "status": "success"
}

NOTE! The first time you add data to your dataset, it will define the schema for that dataset

# Example cURL 1 - passing in via form body, entirely command-line (no character limit)
curl -g --request POST --location 'https://api.akkio.com/v1/datasets?id=id_string&api_key=api_key_string' \
-H "Content-Type: application/json" \
-d '{"rows":"[{\"field name 1\": \"value 1\", \"field name 2\": \"value 2\"}]"}'
# Example cURL 2 - passing in via form body & file named data.json (no character limit)
curl -g --request POST --location 'https://api.akkio.com/v1/datasets?id=id_string&api_key=api_key_string' \
-H "Content-Type: application/json" \
-d @data.json

When passing data via the form body, make sure the JSON is of the form:

{ "rows": [ {<row1>}, {<row2>} ] }

Delete Dataset

Delete Dataset

DELETE https://api.akkio.com/v1/datasets

Deletes a given dataset from a given ID

Request Body

Name
Type
Description

api_key*

string

Your API key, accessible from https://app.akkio.com/team-settings

id

string

The ID of the dataset

{
    "status": "success"
}
# Example cURL

curl --request DELETE 'https://api.akkio.com/v1/datasets?id=id_string&api_key=api_key_string'

Models

Make Prediction

Make Prediction

POST https://api.akkio.com/v1/models

Request Body

Name
Type
Description

api_key*

string

Your api key, accessible from https://app.akkio.com/team-settings

data*

array

Data in the format of: [{'field name 1': 'value 1', 'field name 2': 0}, {...}, ...]

id*

string

The ID of the model to make the prediction with

{
    "status": "success",
    "predictions": [
        {
            "Survived": "0",
            "Probability Survived is 0": 0.8029362559318542,
            "Probability Survived is 1": 0.19706374406814575
        }
    ]
}
# Example cURL

curl -g --request POST 'https://api.akkio.com/v1/models?id=id_string&api_key=api_key_string&data=[{'\''field name 1'\'': '\''value 1'\'', '\''field name 2'\'': 0}]'

Get All Models

Get All Models

GET https://api.akkio.com/v1/models

Query Parameters

Name
Type
Description

api_key*

string

Your api key, accessible from https://app.akkio.com/team-settings

{
    "status": "success",
    "models": [
       
        {
            "id": "mpcfo01LuKwZKkH8fMwN",
            "name": "titanic-sheet-titanic"
        },
        {
            "id": "nPG4VV5MhXwiiuNdgYTU",
            "name": "Lead Scoring Demo"
    ]
}
# Example cURL

curl --request GET 'https://api.akkio.com/v1/models?api_key=api_key_string'

Delete Model

Delete Model

DELETE https://api.akkio.com/v1/models

Request Body

Name
Type
Description

id*

string

The ID of the model to be deleted

api_key*

string

Your api key, accessible from https://app.akkio.com/team-settings

{
    "status": "success"
}
# Example cURL

curl --request DELETE 'https://api.akkio.com/v1/models?id=id_string&api_key=api_key_string'
team settings page