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
  • Concepts
    • Asynchronous Endpoints
    • Authentication
    • Code Generation
    • Terminology
  • Endpoints and Schemas
    • API Specifications
    • Endpoints
      • Chat Explore
      • Projects
      • Training
      • Models
      • Datasets
    • Schemas
    • Additional Libraries
      • Python Library
      • Node.js Library
Powered by GitBook
On this page

Was this helpful?

  1. Concepts

Code Generation

PreviousAuthenticationNextTerminology

Last updated 15 hours ago

Was this helpful?

We provide an OpenAPI Spec that represents a formal specification of our API Interface. A powerful side effect of OpenAPI is that you can perform code generation to generate your own (often strongly-typed) library to work with it.

We'll show you how to do it with TypeScript here, but solutions exist for most languages out there. OpenAPI is very well support across most languages - see for a starting point for virtually every language.

JavaScript / TypeScript Example

is a popular solution for generating a TypeScript client in order to interface with our API in a programmatic, type-safe way.

First, install the library into your project as a dev dependency.

npm install -D openapi-typescript-codegen

Then, add a script to your package.json scripts tag that will perform code generation from our specification.

{
  "scripts": {
    "generate:akkio": "openapi --input https://api.akkio.com/api/v1/api.yaml --output generated/"
  }
}

When run with npm run generate:akkio, this will generate a strongly typed client through which you can easily make type-safe queries.

here
​
openapi-typescript-codegen