JSPM

  • Created
  • Published
  • Downloads 6050
  • Score
    100M100P100Q141333F
  • License ThoughtSpot Development Tools End User License Agreement

ThoughtSpot Typescript Restapi SDK

Package Exports

  • @thoughtspot/rest-api-sdk
  • @thoughtspot/rest-api-sdk/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@thoughtspot/rest-api-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Getting Started with RESTAPI SDK

SDK for ThoughtSpot's v2 Rest APIs (Beta)

Install the Package

Run the following command from your project directory to install the package from npm:

npm install @thoughtspot/rest-api-sdk@1.11.0

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

Parameter Type Description
acceptLanguage string response format
Default: 'application/json'
contentType string body content type for post request
Default: 'application/json'
baseUrl string Default: 'https://localhost:443'
environment Environment The API environment.
Default: Environment.Production
timeout number Timeout for API calls.
Default: 0
httpClientOptions Partial<HttpClientOptions> Stable configurable http client options.
unstableHttpClientOptions any Unstable configurable http client options.
accessToken string The OAuth 2.0 Access Token to use for API requests.

The API client can be initialized as follows:

const client = new Client({
  acceptLanguage: 'application/json',
  contentType: 'application/json',
  timeout: 0,
  environment: Environment.Production,
  accessToken: 'AccessToken',
})

Authorization

This API uses OAuth 2 Bearer token.

Guide

API Reference

Live Playground

We recommend that you browse through the code playground before you start constructing your API requests. The playground offers an interactive portal with comprehensive information about the API endpoints, request and response workflows.