The latest version of .NET SDK is available in nuget package manager - https://www.nuget.org/packages/thoughtspot.rest.api.sdk.
To install the SDK, run the following command at the command line:
dotnet add package thoughtspot.rest.api.sdk
For projects that support PackageReference, add below XML node into the project file to reference the package.
<PackageReference Include="thoughtspot.rest.api.sdk" />
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 |
TimeSpan |
Http client timeout. Default: TimeSpan.FromSeconds(100) |
AccessToken |
string |
The OAuth 2.0 Access Token to use for API requests. |
SkipSslCertVerification |
bool |
Specifies whether to skip SSL certificate verification. Default: false |
The API client can be initialized as follows:
RESTAPISDK.Standard.RESTAPISDKClient client = new RESTAPISDK.Standard.RESTAPISDKClient.Builder()
.AccessToken("AccessToken")
.ContentType(GetEnvironmentVariable("application/json"))
.AcceptLanguage(GetEnvironmentVariable("application/json"))
.Environment(RESTAPISDK.Standard.Environment.Production)
.BaseUrl("https://localhost:443")
.HttpClientConfig(config => config.NumberOfRetries(0))
.Build();
This API uses OAuth 2 Bearer token
.
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.