API ReferenceSDKsJavaScript SDK

JavaScript SDK

Official JavaScript/TypeScript SDK for browser and Node.js environments. The SDK wraps the REST API with typed methods and handles authentication, pagination and retry logic for you.

Installation

npm install @mimasa/sdk or yarn add @mimasa/sdk

Quick Start

Instantiate the client with an API key or OAuth token, then call resource methods such as client.workflows.list() or client.dashboards.create({...}) instead of constructing raw HTTP requests. The SDK targets https://api.mimasa.ai/v1 by default, serializes request bodies to JSON, and automatically follows pagination cursors when you iterate over a list result. Errors are thrown as typed exceptions carrying the same stable error code returned by the underlying API.

API Reference

The SDK exposes one client namespace per resource — workflows, dashboards, charts, dataSources and reports — each with list, get, create, update and, where applicable, execute or download methods that mirror the REST endpoints one-to-one. Every call accepts an optional idempotency key and returns a promise that resolves with parsed JSON or rejects with a typed API error, so TypeScript users get compile-time checking on both requests and responses.