Getting Started with RESTAPI SDK
Install the Rest API SDK
To install the SDK, run the following command at the command line:
pip 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 |
|---|---|---|
content_type |
string |
body content type for post request Default: 'application/json' |
accept_language |
string |
response format Default: 'application/json' |
access_token |
string |
The OAuth 2.0 Access Token to use for API requests. |
base_url |
string |
Default: 'https://localhost:443' |
environment |
Environment | The API environment. Default: Environment.PRODUCTION |
http_client_instance |
HttpClient |
The Http Client passed from the sdk user for making requests |
override_http_client_configuration |
bool |
The value which determines to override properties of the passed Http Client from the sdk user |
timeout |
float |
The value to use for connection timeout. Default: 60 |
max_retries |
int |
The number of times to retry an endpoint call if it fails. Default: 0 |
backoff_factor |
float |
A backoff factor to apply between attempts after the second try. Default: 2 |
retry_statuses |
Array of int |
The http statuses on which retry is to be done. Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524] |
retry_methods |
Array of string |
The http methods on which retry is to be done. Default: ['GET', 'PUT', 'GET', 'PUT'] |
The API client can be initialized as follows:
from restapisdk.restapisdk_client import RestapisdkClient
from restapisdk.configuration import Environment
client = RestapisdkClient(
content_type='application/json',
accept_language='application/json',
access_token='AccessToken',
environment=Environment.PRODUCTION,
base_url = 'https://localhost:443',)
Authorization
This API uses OAuth 2 Bearer token.
Guide
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.
Metadata
Release files for restapisdktest 1.6.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| restapisdktest-1.6.8.tar.gz | 67.4 kB | Without provenance | Details for restapisdktest-1.6.8.tar.gz |
Release files / restapisdktest-1.6.8.tar.gz
| Download URL | restapisdktest-1.6.8.tar.gz |
|---|---|
| Size | 67.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b88ad134a9b614035f91cfd45d6febbded587498ea194812a6cae60a11d15b91
|
|
BLAKE2b-256 checksum How to use checksums |
5c7af00d88675a31228f6aac6f63ae93c94cc6acbd8aaec868976265e3c87f25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2
|
Security for restapisdktest 1.6.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.