# Java SDK for REST APIs

> For the complete documentation index, see [llms.txt](https://developers.thoughtspot.com/docs/llms.txt)

Source: https://developers.thoughtspot.com/docs/rest-api-sdk-java

# Java SDK for REST APIs

The [REST API Java SDK](https://github.com/thoughtspot/rest-api-sdk/tree/release/sdks/java) provides a client library to interact with ThoughtSpot REST API v2 endpoints from Java applications.

## Before you begin

Before you begin, check if your setup meets the following requirements:

-   Your application setup has the necessary tools and environments for installing, deploying, and testing the SDK integration.
    
-   The REST API Java SDK library supports Java 8 and later. Ensure that your environment has Java 8 or later installed.
    
-   You have access to the necessary repositories on GitHub and Maven Central and network permissions download dependencies.
    
-   You have a ThoughtSpot instance with access to v2 REST APIs.  
    For token-based authentication, you’ll need access to the secret key.
    
-   User privileges and object permissions to view, edit, or create ThoughtSpot objects and resources.
    

## Import the SDK to your application environment

If you are using Maven, add the REST API Java SDK as a dependency to the POM.xml file in your project:

```xml
<dependency>
  <groupId>com.thoughtspot</groupId>
  <artifactId>rest-api-sdk</artifactId>
  <version>2.22.0</version>
  <scope>compile</scope>
</dependency>
```

If you are using Gradle, add the REST API Java SDK as a dependency to your build file:

```
  repositories {
    mavenCentral()
  }

  dependencies {
     implementation "com.thoughtspot:rest-api-sdk:2.22.0"
   // Use the latest version of the SDK
}
```

## API client configuration

The **ApiClientConfiguration** class in the REST API Java SDK allows configuring the settings required for API clients to call REST APIs from their application context. Use this class to specify any of the following methods and parameters:

-   `basePath` - Sets the base path for API requests.
    
-   `bearerToken` - Sets bearer tokens to authenticate API requests.
    
-   `bearerTokenSupplier` - Sets the bearer token supplier for authentication.
    
-   `defaultHeader` - Adds a default header to API requests.
    
-   `defaultHeaderMap` - Sets a map of default headers to include in the API requests.
    
-   `defaultCookie` - Adds a default cookie to the client configuration.
    
-   `defaultCookieMap` - Sets a map of default cookies in the client configuration.
    
-   `verifyingSsl` - Enables Secure Sockets Layer (SSL) certificate verification for API requests.
    
-   `sslCaCert` - Configures the client to use a specific input stream that contains the SSL CA certificate.
    
-   `keyManager` - Adds a key manager to the client configuration.
    
-   `keyManagers` - Adds a list of key managers to the client configuration.
    
-   `downloadPath` - Sets the download path for files.
    
-   `connectTimeoutMillis` - Sets the connection timeout.
    
-   `readTimeoutMillis` - Configures the maximum number of seconds the client will wait for a response after sending a request before timing out.
    
-   `writeTimeoutMillis` - Configures the maximum number of milliseconds the client will wait for the data to be written to the server after sending a request before timing out.
    

```Java
// Create configuration for the ThoughtSpot API client
        ApiClientConfiguration apiClientConfiguration = new ApiClientConfiguration.Builder()
                .basePath(BASE_PATH) // Your ThoughtSpot application URL
                .verifyingSsl(false) // Disable SSL verification for testing purposes
                .readTimeoutMillis(30000) // Extended read timeout to 30 seconds
                .build();
```

## Authentication

The REST API v2.0 supports various authentication methods. The most common method used for automation and application integration is the token-based authentication. To get a token from from authentication token endpoint, you need to specify the `username` and `password` or `secret_key`.

The following example shows the code for getting an authentication token by passing `username` and `password`, and creating a user session using this token:

```Java
package org.example;

// Import classes:
import com.thoughtspot.client.ApiClientConfiguration;
import com.thoughtspot.client.ApiException;
import com.thoughtspot.client.api.ThoughtSpotRestApi;
import com.thoughtspot.client.model.GetFullAccessTokenRequest;
import com.thoughtspot.client.model.Token;
import com.thoughtspot.client.model.User;

public class Example {
  private static final String BASE_PATH = *CLUSTER_URL*; // Your ThoughtSpot application URL
  private static final String DOWNLOAD_PATH = "."  // path to download files
  private static final String USERNAME = "tsUserA"; // Username
  private static final String PASSWORD = "Your-Password"; // Password

  public static void main(String[] args) {
    try {
        // Create configuration for the ThoughtSpot API client
        ApiClientConfiguration apiClientConfiguration = new ApiClientConfiguration.Builder()
                .basePath(BASE_PATH)
                .verifyingSsl(false) // Disable SSL verification for testing purposes
                .readTimeoutMillis(30000) // Extended read timeout to 30 seconds
                .downloadPath(DOWNLOAD_PATH)  // Defaults to system download path if not specified
                .build();

        // Create an instance of the ThoughtSpot API client
        ThoughtSpotRestApi tsRestApi = new ThoughtSpotRestApi(apiClientConfiguration);

        // Authenticate the user and retrieve the full access token
        GetFullAccessTokenRequest getFullAccessTokenRequest = new GetFullAccessTokenRequest()
                .username(USERNAME)
                .password(PASSWORD);
        Token response = tsRestApi.getFullAccessToken(getFullAccessTokenRequest);

        // Update the API client configuration with the access token
        apiClientConfiguration = apiClientConfiguration.toBuilder()
                .bearerTokenSupplier(response::getToken) // You can pass your own token supplier here
                .build();

        // Apply the updated configuration to the ThoughtSpot API client
        tsRestApi.applyApiClientConfiguration(apiClientConfiguration);

       // Current user information
        User currentUser = tsRestApi.getCurrentUserInfo();
        System.out.println("Current User: " + currentUser.toJson());

        // Optionally, use .{REQUEST}WithHttpInfo() to get response details
        ApiResponse<User> currentUserResponse = tsRestApi.getCurrentUserInfoWithHttpInfo();
        System.out.println("Current User: " + currentUserResponse.getData().toString());
        System.out.println("Status code: " + currentUserResponse.getStatusCode());
        System.out.println("Response headers: " + currentUserResponse.getHeaders().toString());
    } catch (ApiException e) {
        System.err.println("Exception when calling ThoughtSpot API");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
  }
}
```

You can also obtain a token by sending `username` and `secret_key` in your authentication token request. The secret key is generated when [**Trusted authentication** is enabled]({{navprefix}}/{{trusted-auth-secret-key}}) on your instance and can be viewed on the **Develop** > **Security Settings** page.

The following example shows the code for getting an authentication token by passing `username` and `secret_key`, and creating a user session using this token:

```Java
package org.example;

// Import classes:
import com.thoughtspot.client.ApiClientConfiguration;
import com.thoughtspot.client.ApiException;
import com.thoughtspot.client.api.ThoughtSpotRestApi;
import com.thoughtspot.client.model.GetFullAccessTokenRequest;
import com.thoughtspot.client.model.Token;
import com.thoughtspot.client.model.User;

public class Example {
  private static final String BASE_PATH = *CLUSTER_URL*; // Your ThoughtSpot application URL
  private static final String USERNAME = "tsUserA"; // Username
  private static final String SECRET_KEY = "YOUR_SECRET_KEY"; // Secret key generated for your instance

  public static void main(String[] args) {
    try {
        // Create configuration for the ThoughtSpot API client
        ApiClientConfiguration apiClientConfiguration = new ApiClientConfiguration.Builder()
                .basePath(BASE_PATH)
                .verifyingSsl(false) // Disable SSL verification for testing only
                .readTimeoutMillis(30000)
                .build();

        // Create an instance of the ThoughtSpot API client
        ThoughtSpotRestApi tsRestApi = new ThoughtSpotRestApi(apiClientConfiguration);

        // Authenticate the user and retrieve the full access token using secret_key
        GetFullAccessTokenRequest getFullAccessTokenRequest = new GetFullAccessTokenRequest()
                .username(USERNAME)
                .secretKey(SECRET_KEY); // Use secretKey. Do not use password

        Token response = tsRestApi.getFullAccessToken(getFullAccessTokenRequest);

        // Update the API client configuration with the access token
        apiClientConfiguration = apiClientConfiguration.toBuilder()
                .bearerTokenSupplier(response::getToken)
                .build();

        // Apply the updated configuration to the ThoughtSpot API client
        tsRestApi.applyApiClientConfiguration(apiClientConfiguration);

        // Current user information
        User currentUser = tsRestApi.getCurrentUserInfo();
        System.out.println("Current User: " + currentUser.toJson());
    } catch (ApiException e) {
        System.err.println("Exception when calling ThoughtSpot API");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
    }
  }
}
```

## Create a test API request

Make a test API call to test the integration and verify the response.

This example uses the `CreateUserRequest` object to create a user.

```Java
package org.example;

import com.thoughtspot.client.ApiClientConfiguration;
import com.thoughtspot.client.ApiException;
import com.thoughtspot.client.api.ThoughtSpotRestApi;
import com.thoughtspot.client.model.CreateUserRequest;
import com.thoughtspot.client.model.User;

public class AddUserExample {
    private static final String BASE_PATH = *CLUSTER_URL*; // Your ThoughtSpot application instance
    private static final String BEARER_TOKEN = "YOUR_AUTH_TOKEN"; // Token obtained from ThoughtSpot to authorize your API calls

    public static void main(String[] args) {
        try {
            // Configure the API client with the bearer token
            ApiClientConfiguration apiClientConfiguration = new ApiClientConfiguration.Builder()
                    .basePath(BASE_PATH)
                    .bearerTokenSupplier(() -> BEARER_TOKEN)
                    .verifyingSsl(false) // For testing only; enable SSL in production
                    .readTimeoutMillis(30000)
                    .build();

            // Create an instance of the ThoughtSpot API client
            ThoughtSpotRestApi tsRestApi = new ThoughtSpotRestApi(apiClientConfiguration);

            // Build the user creation request
            CreateUserRequest createUserRequest = new CreateUserRequest()
                    .name("UserA@example.com")
                    .displayName("User A")
                    .password("StrongPassword123!") // Set an initial password
                    .groupIdentifiers(Arrays.asList("sales", "marketing")) // Optional: assign groups
                    .addOrgIdentifiersItem(Org_ID); // Optional: set Org ID if using a multi-tenant instance

            // Create the user
            User createdUser = tsRestApi.createUser(createUserRequest);

            // Output the created user details
            System.out.println("User created: " + createdUser.toJson());
        } catch (ApiException e) {
            System.err.println("Exception when calling ThoughtSpot API");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

## Error handling

The SDK raises an exception when an API request fails. Inspect the HTTP status code, response body, and response headers to determine the cause of the failure and respond appropriately. Catching exceptions is a standard way to handle these errors. The code samples in this document show how to handle errors using the `ApiException` class.

## Supported versions

Note the recommendation of Java SDK:

 
| ThoughtSpot release version | Supported SDK version |
| --- | --- |
| 
ThoughtSpot Cloud: 26.9.0.cl

 | 

v2.28.0 or later

 |
| 

ThoughtSpot Cloud: 26.8.0.cl

 | 

v2.27.1 or later

 |
| 

ThoughtSpot Cloud: 26.7.0.cl

 | 

v2.26.0 or later

 |
| 

ThoughtSpot Cloud: 26.6.0.cl

 | 

v2.25.0 or later

 |
| 

ThoughtSpot Cloud: 26.5.0.cl

 | 

v2.24.0 or later

 |
| 

ThoughtSpot Cloud: 26.4.0.cl

 | 

v2.23.0 or later

 |
| 

ThoughtSpot Cloud: 26.3.0.cl

 | 

v2.22.0 or later

 |
| 

ThoughtSpot Software: 26.3.0.sw

 | 

v2.22.0 or later

 |
| 

ThoughtSpot Cloud: 26.2.0.cl

 | 

v2.21.0 or later

 |
| 

ThoughtSpot Cloud: 10.15.0.cl

 | 

v2.20.0 or later

 |
| 

ThoughtSpot Cloud: 10.14.0.cl

 | 

v2.19.0 or later

 |
| 

ThoughtSpot Cloud: 10.13.0.cl

 | 

v2.18.0 or later

 |
| 

ThoughtSpot Cloud: 10.12.0.cl

 | 

v2.17.0 or later

 |
| 

ThoughtSpot Cloud: 10.11.0.cl

 | 

v2.16.0 or later

 |
| 

ThoughtSpot Cloud: 10.10.0.cl

 | 

v2.15.1 or later

 |
| 

ThoughtSpot Software: 10.10.0.sw

 | 

v2.15.1 or later

 |
| 

ThoughtSpot Cloud: 10.9.0.cl

 | 

v2.14.0 or later

 |

## SDK Reference

 
| Method | HTTP request |
| --- | --- |
| 
[activateUser](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#activateUser)

 | 

**POST** /api/rest/2.0/users/activate

 |
| 

[assignChangeAuthor](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#assignChangeAuthor)

 | 

**POST** /api/rest/2.0/security/metadata/assign

 |
| 

[assignTag](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#assignTag)

 | 

**POST** /api/rest/2.0/tags/assign

 |
| 

[changeUserPassword](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#changeUserPassword)

 | 

**POST** /api/rest/2.0/users/change-password

 |
| 

[commitBranch](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#commitBranch)

 | 

**POST** /api/rest/2.0/vcs/git/branches/commit

 |
| 

[connectionConfigurationSearch](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#connectionConfigurationSearch)

 | 

**POST** /api/rest/2.0/connection-configurations/search

 |
| 

[convertWorksheetToModel](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#convertWorksheetToModel)

 | 

**POST** /api/rest/2.0/metadata/worksheets/convert

 |
| 

[copyObject](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#copyObject)

 | 

**POST** /api/rest/2.0/metadata/copyobject

 |
| 

[createAgentConversation](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createAgentConversation)

 | 

**POST** /api/rest/2.0/ai/agent/conversation/create

 |
| 

[createCalendar](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createCalendar)

 | 

**POST** /api/rest/2.0/calendars/create

 |
| 

[createConfig](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createConfig)

 | 

**POST** /api/rest/2.0/vcs/git/config/create

 |
| 

[createConnection](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createConnection)

 | 

**POST** /api/rest/2.0/connection/create

 |
| 

[createConnectionConfiguration](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createConnectionConfiguration)

 | 

**POST** /api/rest/2.0/connection-configurations/create

 |
| 

[createConversation](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createConversation)

 | 

**POST** /api/rest/2.0/ai/conversation/create

 |
| 

[createCustomAction](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createCustomAction)

 | 

**POST** /api/rest/2.0/customization/custom-actions

 |
| 

[createOrg](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createOrg)

 | 

**POST** /api/rest/2.0/orgs/create

 |
| 

[createRole](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createRole)

 | 

**POST** /api/rest/2.0/roles/create

 |
| 

[createSchedule](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createSchedule)

 | 

**POST** /api/rest/2.0/schedules/create

 |
| 

[createTag](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createTag)

 | 

**POST** /api/rest/2.0/tags/create

 |
| 

[createUser](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createUser)

 | 

**POST** /api/rest/2.0/users/create

 |
| 

[createUserGroup](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createUserGroup)

 | 

**POST** /api/rest/2.0/groups/create

 |
| 

[createVariable](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#createVariable)

 | 

**POST** /api/rest/2.0/template/variables/create

 |
| 

[dbtConnection](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#dbtConnection)

 | 

**POST** /api/rest/2.0/dbt/dbt-connection

 |
| 

[dbtGenerateSyncTml](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#dbtGenerateSyncTml)

 | 

**POST** /api/rest/2.0/dbt/generate-sync-tml

 |
| 

[dbtGenerateTml](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#dbtGenerateTml)

 | 

**POST** /api/rest/2.0/dbt/generate-tml

 |
| 

[dbtSearch](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#dbtSearch)

 | 

**POST** /api/rest/2.0/dbt/search

 |
| 

[deactivateUser](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deactivateUser)

 | 

**POST** /api/rest/2.0/users/deactivate

 |
| 

[deleteConfig](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteConfig)

 | 

**POST** /api/rest/2.0/vcs/git/config/delete

 |
| 

[deleteConnection](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteConnection)

 | 

**POST** /api/rest/2.0/connection/delete

 |
| 

[deleteConnectionConfiguration](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteConnectionConfiguration)

 | 

**POST** /api/rest/2.0/connection-configurations/delete

 |
| 

[deleteConnectionV2](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteConnectionV2)

 | 

**POST** /api/rest/2.0/connections/{connection\_identifier}/delete

 |
| 

[deleteCustomAction](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteCustomAction)

 | 

**POST** /api/rest/2.0/customization/custom-actions/{custom\_action\_identifier}/delete

 |
| 

[deleteDbtConnection](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteDbtConnection)

 | 

**POST** /api/rest/2.0/dbt/{dbt\_connection\_identifier}/delete

 |
| 

[deleteMetadata](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteMetadata)

 | 

**POST** /api/rest/2.0/metadata/delete

 |
| 

[deleteOrg](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteOrg)

 | 

**POST** /api/rest/2.0/orgs/{org\_identifier}/delete

 |
| 

[deleteOrgEmailCustomization](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteOrgEmailCustomization)

 | 

**POST** /api/rest/2.0/customization/email/delete

 |
| 

[deleteSchedule](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteSchedule)

 | 

**POST** /api/rest/2.0/schedules/{schedule\_identifier}/delete

 |
| 

[deleteTag](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteTag)

 | 

**POST** /api/rest/2.0/tags/{tag\_identifier}/delete

 |
| 

[deleteUser](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteUser)

 | 

**POST** /api/rest/2.0/users/{user\_identifier}/delete

 |
| 

[deleteUserGroup](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteUserGroup)

 | 

**POST** /api/rest/2.0/groups/{group\_identifier}/delete

 |
| 

[deleteVariable](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deleteVariable)

 | 

**POST** /api/rest/2.0/template/variables/{identifier}/delete

 |
| 

[deployCommit](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#deployCommit)

 | 

**POST** /api/rest/2.0/vcs/git/commits/deploy

 |
| 

[downloadConnectionMetadataChanges](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#downloadConnectionMetadataChanges)

 | 

**POST** /api/rest/2.0/connections/download-connection-metadata-changes/{connection\_identifier}

 |
| 

[exportAnswerReport](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#exportAnswerReport)

 | 

**POST** /api/rest/2.0/report/answer

 |
| 

[exportLiveboardReport](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#exportLiveboardReport)

 | 

**POST** /api/rest/2.0/report/liveboard

 |
| 

[exportMetadataTML](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#exportMetadataTML)

 | 

**POST** /api/rest/2.0/metadata/tml/export

 |
| 

[exportMetadataTMLBatched](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#exportMetadataTMLBatched)

 | 

**POST** /api/rest/2.0/metadata/tml/export/batch

 |
| 

[fetchAnswerData](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchAnswerData)

 | 

**POST** /api/rest/2.0/metadata/answer/data

 |
| 

[fetchAnswerSqlQuery](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchAnswerSqlQuery)

 | 

**POST** /api/rest/2.0/metadata/answer/sql

 |
| 

[fetchAsyncImportTaskStatus](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchAsyncImportTaskStatus)

 | 

**POST** /api/rest/2.0/metadata/tml/async/status

 |
| 

[fetchColumnSecurityRules](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchColumnSecurityRules)

 | 

**POST** /api/rest/2.0/security/column/rules/fetch

 |
| 

[fetchConnectionDiffStatus](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchConnectionDiffStatus)

 | 

**POST** /api/rest/2.0/connections/fetch-connection-diff-status/{connection\_identifier}

 |
| 

[fetchLiveboardData](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchLiveboardData)

 | 

**POST** /api/rest/2.0/metadata/liveboard/data

 |
| 

[fetchLiveboardSqlQuery](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchLiveboardSqlQuery)

 | 

**POST** /api/rest/2.0/metadata/liveboard/sql

 |
| 

[fetchLogs](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchLogs)

 | 

**POST** /api/rest/2.0/logs/fetch

 |
| 

[fetchPermissionsOfPrincipals](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchPermissionsOfPrincipals)

 | 

**POST** /api/rest/2.0/security/principals/fetch-permissions

 |
| 

[fetchPermissionsOnMetadata](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#fetchPermissionsOnMetadata)

 | 

**POST** /api/rest/2.0/security/metadata/fetch-permissions

 |
| 

[forceLogoutUsers](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#forceLogoutUsers)

 | 

**POST** /api/rest/2.0/users/force-logout

 |
| 

[getCurrentUserInfo](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getCurrentUserInfo)

 | 

**GET** /api/rest/2.0/auth/session/user

 |
| 

[getCurrentUserToken](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getCurrentUserToken)

 | 

**GET** /api/rest/2.0/auth/session/token

 |
| 

[getCustomAccessToken](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getCustomAccessToken)

 | 

**POST** /api/rest/2.0/auth/token/custom

 |
| 

[getFullAccessToken](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getFullAccessToken)

 | 

**POST** /api/rest/2.0/auth/token/full

 |
| 

[getObjectAccessToken](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getObjectAccessToken)

 | 

**POST** /api/rest/2.0/auth/token/object

 |
| 

[getRelevantQuestions](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getRelevantQuestions)

 | 

**POST** /api/rest/2.0/ai/relevant-questions/

 |
| 

[getSystemConfig](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getSystemConfig)

 | 

**GET** /api/rest/2.0/system/config

 |
| 

[getSystemInformation](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getSystemInformation)

 | 

**GET** /api/rest/2.0/system

 |
| 

[getSystemOverrideInfo](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#getSystemOverrideInfo)

 | 

**GET** /api/rest/2.0/system/config-overrides

 |
| 

[importMetadataTML](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#importMetadataTML)

 | 

**POST** /api/rest/2.0/metadata/tml/import

 |
| 

[importMetadataTMLAsync](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#importMetadataTMLAsync)

 | 

**POST** /api/rest/2.0/metadata/tml/async/import

 |
| 

[importUserGroups](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#importUserGroups)

 | 

**POST** /api/rest/2.0/groups/import

 |
| 

[importUsers](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#importUsers)

 | 

**POST** /api/rest/2.0/users/import

 |
| 

[login](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#login)

 | 

**POST** /api/rest/2.0/auth/session/login

 |
| 

[logout](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#logout)

 | 

**POST** /api/rest/2.0/auth/session/logout

 |
| 

[parameterizeMetadata](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#parameterizeMetadata)

 | 

**POST** /api/rest/2.0/metadata/parameterize

 |
| 

[publishMetadata](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#publishMetadata)

 | 

**POST** /api/rest/2.0/security/metadata/publish

 |
| 

[queryGetDecomposedQuery](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#queryGetDecomposedQuery)

 | 

**POST** /api/rest/2.0/ai/analytical-questions

 |
| 

[resetUserPassword](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#resetUserPassword)

 | 

**POST** /api/rest/2.0/users/reset-password

 |
| 

[revertCommit](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#revertCommit)

 | 

**POST** /api/rest/2.0/vcs/git/commits/{commit\_id}/revert

 |
| 

[revokeToken](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#revokeToken)

 | 

**POST** /api/rest/2.0/auth/token/revoke

 |
| 

[searchCalendars](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchCalendars)

 | 

**POST** /api/rest/2.0/calendars/search

 |
| 

[searchCommits](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchCommits)

 | 

**POST** /api/rest/2.0/vcs/git/commits/search

 |
| 

[searchConfig](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchConfig)

 | 

**POST** /api/rest/2.0/vcs/git/config/search

 |
| 

[searchConnection](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchConnection)

 | 

**POST** /api/rest/2.0/connection/search

 |
| 

[searchCustomActions](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchCustomActions)

 | 

**POST** /api/rest/2.0/customization/custom-actions/search

 |
| 

[searchData](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchData)

 | 

**POST** /api/rest/2.0/searchdata

 |
| 

[searchMetadata](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchMetadata)

 | 

**POST** /api/rest/2.0/metadata/search

 |
| 

[searchOrgs](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchOrgs)

 | 

**POST** /api/rest/2.0/orgs/search

 |
| 

[searchRoles](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchRoles)

 | 

**POST** /api/rest/2.0/roles/search

 |
| 

[searchSchedules](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchSchedules)

 | 

**POST** /api/rest/2.0/schedules/search

 |
| 

[searchTags](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchTags)

 | 

**POST** /api/rest/2.0/tags/search

 |
| 

[searchUserGroups](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchUserGroups)

 | 

**POST** /api/rest/2.0/groups/search

 |
| 

[searchVariables](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#searchVariables)

 | 

**POST** /api/rest/2.0/template/variables/search

 |
| 

[sendAgentMessageStreaming](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#sendAgentMessageStreaming)

 | 

**POST** /api/rest/2.0/ai/agent/converse/sse

 |
| 

[sendMessage](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#sendMessage)

 | 

**POST** /api/rest/2.0/ai/conversation/{conversation\_identifier}/converse

 |
| 

[shareMetadata](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#shareMetadata)

 | 

**POST** /api/rest/2.0/security/metadata/share

 |
| 

[singleAnswer](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#singleAnswer)

 | 

**POST** /api/rest/2.0/ai/answer/create

 |
| 

[unassignTag](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#unassignTag)

 | 

**POST** /api/rest/2.0/tags/unassign

 |
| 

[unparameterizeMetadata](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#unparameterizeMetadata)

 | 

**POST** /api/rest/2.0/metadata/unparameterize

 |
| 

[unpublishMetadata](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#unpublishMetadata)

 | 

**POST** /api/rest/2.0/security/metadata/unpublish

 |
| 

[updateCalendar](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateCalendar)

 | 

**POST** /api/rest/2.0/calendars/{calendar\_identifier}/update

 |
| 

[updateColumnSecurityRules](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateColumnSecurityRules)

 | 

**POST** /api/rest/2.0/security/column/rules/update

 |
| 

[updateConfig](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateConfig)

 | 

**POST** /api/rest/2.0/vcs/git/config/update

 |
| 

[updateConnection](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateConnection)

 | 

**POST** /api/rest/2.0/connection/update

 |
| 

[updateConnectionConfiguration](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateConnectionConfiguration)

 | 

**POST** /api/rest/2.0/connection-configurations/{configuration\_identifier}/update

 |
| 

[updateConnectionV2](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateConnectionV2)

 | 

**POST** /api/rest/2.0/connections/{connection\_identifier}/update

 |
| 

[updateCustomAction](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateCustomAction)

 | 

**POST** /api/rest/2.0/customization/custom-actions/{custom\_action\_identifier}/update

 |
| 

[updateDbtConnection](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateDbtConnection)

 | 

**POST** /api/rest/2.0/dbt/update-dbt-connection

 |
| 

[updateEmailCustomization](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateEmailCustomization)

 | 

**POST** /api/rest/2.0/customization/email/update

 |
| 

[updateMetadataHeader](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateMetadataHeader)

 | 

**POST** /api/rest/2.0/metadata/headers/update

 |
| 

[updateMetadataObjId](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateMetadataObjId)

 | 

**POST** /api/rest/2.0/metadata/update-obj-id

 |
| 

[updateOrg](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateOrg)

 | 

**POST** /api/rest/2.0/orgs/{org\_identifier}/update

 |
| 

[updateRole](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateRole)

 | 

**POST** /api/rest/2.0/roles/{role\_identifier}/update

 |
| 

[updateSchedule](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateSchedule)

 | 

**POST** /api/rest/2.0/schedules/{schedule\_identifier}/update

 |
| 

[updateSystemConfig](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateSystemConfig)

 | 

**POST** /api/rest/2.0/system/config-update

 |
| 

[updateTag](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateTag)

 | 

**POST** /api/rest/2.0/tags/{tag\_identifier}/update

 |
| 

[updateUser](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateUser)

 | 

**POST** /api/rest/2.0/users/{user\_identifier}/update

 |
| 

[updateUserGroup](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateUserGroup)

 | 

**POST** /api/rest/2.0/groups/{group\_identifier}/update

 |
| 

[updateVariable](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateVariable)

 | 

**POST** /api/rest/2.0/template/variables/{identifier}/update

 |
| 

[updateVariableValues](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#updateVariableValues)

 | 

**POST** /api/rest/2.0/template/variables/update

 |
| 

[validateEmailCustomization](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#validateEmailCustomization)

 | 

**POST** /api/rest/2.0/customization/email/validate

 |
| 

[validateMerge](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#validateMerge)

 | 

**POST** /api/rest/2.0/vcs/git/branches/validate

 |
| 

[validateToken](https://github.com/thoughtspot/rest-api-sdk/blob/release/sdks/java/docs/ThoughtSpotRestApi.md#validateToken)

 | 

**POST** /api/rest/2.0/auth/token/validate

 |