Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 3.06 KB

File metadata and controls

71 lines (50 loc) · 3.06 KB

Requirements

Getting started

  1. Install the tools listed in the "Requirements" section.

    1. Make sure that Tableau Server is running if you are using your own server.
  2. In the /res folder, open the config.properties file using a text editor.

    1. Modify the configurations as instructed in the file.
    2. A sample workbook is already provided with this sample, but you can use any packaged workbook that you want.
  3. Download the REST API schema and save it in the /res folder under the folder where this README file is. For more information about the schema, see the following documentation:

    http://onlinehelp.tableau.com/current/api/rest_api/en-us/help.htm#REST/rest_api_concepts_schema.htm

  4. In the /res folder, open the config.properties file using a text editor.

  5. Modify the configurations as instructed in the file. A sample workbook is already provided with this sample, but you can use any packaged workbook that you want.

  6. Open the following file in a text editor:

    src\com\tableausoftware\documentation\api\rest\util\RestApiUtils.java
    
  7. Find the getApiUriBuilder() method, and replace the API URL with the correct version number.

    For example, you might see the following URL:

    /api/3.5/
    

    If you want to use version 3.4 of the API, replace the URL with the following:

    /api/3.4/
    

Running the sample

  1. Make sure that Tableau Server is running.
  2. Open a command prompt or terminal.
    1. In the command prompt window, change directory to the sample code's parent folder.
    2. Enter ant in the command prompt to compile the sample code and download dependencies.
    3. Enter ant run in the command prompt to run the sample code after compilation.

Possible problems

When ant is run in a command prompt, it may respond with "ant is not recognized as an internal or external command..."

Make sure that the ANT_HOME and JAVA_HOME variables are set as described in the installation guide for Apache Ant. Paths should not include quotes. For more information, see http://ant.apache.org/manual/install.html#windows

The example code uses version 3.0 of the REST API and schema. If you want to use a different version:

  1. Download the REST API schema and save it in the /res folder under the folder where this README file is. For more information about the schema, see the following documentation:

    http://onlinehelp.tableau.com/current/api/rest_api/en-us/help.htm#REST/rest_api_concepts_schema.htm

  2. In the /res folder, open the config.properties file using a text editor.

  3. Update the schema configuration properties to match the new file.