JSPM

  • Created
  • Published
  • Downloads 6142
  • Score
    100M100P100Q139791F
  • 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

Install the Rest API SDK

To install the SDK, run the following command at the command line:

npm install @thoughtspot/rest-api-sdk

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
contentType string body content type for post request
Default: 'application/json'
acceptLanguage string response format
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
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({
  contentType: 'application/json',
  acceptLanguage: '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.