JSPM

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

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

npm install thoughtspot@rest-api-sdk@1.9.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
xRequestedBy string Mandatory header with value Thougtspot to accept the external RestAPI requests
Default: 'ThoughtSpot'
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({
  xRequestedBy: 'ThoughtSpot',
  acceptLanguage: 'application/json',
  contentType: 'application/json',
  timeout: 0,
  environment: Environment.Production,
  accessToken: 'AccessToken',
})

Authorization

This API uses OAuth 2 Bearer token.

List of APIs

Classes Documentation