Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating REST API samples and readme files (#27) #30

Merged
merged 1 commit into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
## Getting started

1. Install the tools listed in the "Requirements" section.
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:
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>

1. In the "res" folder, open the "config.properties" file using a text editor.
1. In the `/res` folder, open the `config.properties` file using a text editor.
1. 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.
1. Open the following file in a text editor:

Expand All @@ -31,13 +31,13 @@
For example, you might see the following URL:

```
/api/2.8/
/api/3.0/
```

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

```
/api/2.4/
/api/2.8/
```

## Running the sample
Expand All @@ -50,7 +50,7 @@

## Possible problems

When "ant" is run in a command prompt, it may respond with "ant is not recognized as an internal or external command..."
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>
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static RestApiUtils getInstance() {
* @return the URI builder
*/
private static UriBuilder getApiUriBuilder() {
return UriBuilder.fromPath(m_properties.getProperty("server.host") + "/api/2.8");
return UriBuilder.fromPath(m_properties.getProperty("server.host") + "/api/3.0");
}
/**
* Initializes the RestApiUtils. The initialize code loads values from the configuration
Expand Down
4 changes: 2 additions & 2 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Running the samples
* All samples require 2 arguments: server adress (without a trailing slash) and username
* Run by executing ```python sample_file_name.py <server_address> <username>```
* Specific information for each sample are included at the top of each file
* API version is set to 2.7 by default for Tableau server 10.4, but it can be changed in [version.py](./version.py)
* API version is set to 3.0 by default for Tableau Server 2018.1, but it can be changed in [version.py](./version.py)
* For Tableau Server 9.0, the REST API namespace must be changed (refer to comment in each sample where namespace, xmlns, is defined)

REST API Samples
Expand All @@ -20,6 +20,6 @@ These are created and maintained by Tableau.
Demo | Source Code | Description
-------- | -------- | --------
Publish Workbook | [publish_workbook.py](./publish_workbook.py) | Shows how to upload a Tableau workbook using both a single request as well as chunking the upload.
Move Workbook | [move_workbook_projects.py](./move_workbook_projects.py)<br />[move_workbook_sites.py](./move_workbook_sites.py)<br />[move_workbook_server.py](./move_workbook_server.py) | Shows how to move a workbook from one project/site/server to another. Moving across different sites and servers require downloading the workbook. 2 methods of downloading are demonstrated in the sites and servers samples.<br /><br />Moving to another project uses an API call to update workbook.<br />Moving to another site uses in-memory download method.<br />Moving to another server uses a temporary file to download workbook.
Move Workbook | [move_workbook_projects.py](./move_workbook_projects.py)<br />[move_workbook_sites.py](./move_workbook_sites.py)<br />[move_workbook_server.py](./move_workbook_server.py) | Shows how to move a workbook from one project/site/server to another. Moving across different sites and servers require downloading the workbook. Two methods of downloading are demonstrated in the sites and server samples.<br /><br />Moving to another project uses an API call to update workbook.<br />Moving to another site uses in-memory download method.<br />Moving to another server uses a temporary file to download workbook.
Add Permissions | [user_permission_audit.py](./user_permission_audit.py) | Shows how to add permissions for a given user to a given workbook.
Global Workbook Permissions | [update_permission.py](./update_permission.py) | Shows how to add or update user permissions for every workbook on a given site or project.
2 changes: 1 addition & 1 deletion python/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '2.8'
VERSION = '3.0'