You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/api-ref.md
+43-38Lines changed: 43 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The TSC API reference is organized by resource. The TSC library is modeled after
28
28
29
29
## Authentication
30
30
31
-
You can use the TSC library to manage authentication, so you can sign in and sign out of Tableau Server and Tableau Online. The authentication resources for Tableau Server are defined in the `TableauAuth` class and they correspond to the authentication attributes you can access using the Tableau Server REST API.
31
+
You can use the TSC library to sign in and sign out of Tableau Server and Tableau Online. The credentials for signing in are defined in the `TableauAuth` class and they correspond to the attributes you specify when you sign in using the Tableau Server REST API.
32
32
33
33
<br>
34
34
<br>
@@ -38,7 +38,7 @@ You can use the TSC library to manage authentication, so you can sign in and sig
The `TableauAuth` class contains the attributes for the authentication resources. The `TableauAuth` class defines the information you can set in a request or query from Tableau Server. The class members correspond to the attributes of a server request or response payload. To use this class, create a new instance, supplying user name, password, and site information if necessary, and pass the request object to the [Auth.sign_in](#auth.sign-in) method.
41
+
The `TableauAuth` class defines the information you can set in a sign-in request. The class members correspond to the attributes of a server request or response payload. To use this class, create a new instance, supplying user name, password, and site information if necessary, and pass the request object to the [Auth.sign_in](#auth.sign-in) method.
42
42
43
43
44
44
**Note:** In the future, there might be support for additional forms of authorization and authentication (for example, OAuth).
@@ -63,7 +63,7 @@ import tableauserverclient as TSC
# pass the "tableau_auth" request object to server.auth.sign_in()
66
+
# pass the "tableau_auth" object to the server.auth.sign_in() method
67
67
```
68
68
69
69
<br>
@@ -87,7 +87,7 @@ auth.sign_in(auth_req)
87
87
Signs you in to Tableau Server.
88
88
89
89
90
-
The method signs into Tableau Server or Tableau Online and manages the authentication token. You call this method from the server object you create. For information about the server object, see [Server](#server). The authentication token keeps you signed in for 240 minutes, or until you call the `auth.sign_out` method. Before you use this method, you first need to create the sign-in request (`auth_req`) by creating an instance of the `TableauAuth`. To call this method, create a server object for your server. For more information, see [Sign in and Out](sign-in-out).
90
+
The method signs into Tableau Server or Tableau Online and manages the authentication token. You call this method from the server object you create. For information about the server object, see [Server](#server). The authentication token keeps you signed in for 240 minutes, or until you call the `auth.sign_out` method. Before you use this method, you first need to create the sign-in request (`auth_req`) object by creating an instance of the `TableauAuth`. To call this method, create a server object for your server. For more information, see [Sign in and Out](sign-in-out).
The connections for Tableau Server data sources and workbooks are represented by a `ConnectionItem` class. You can call data source and view methods to query or update the connection information. The `ConnectionCredentials` class represents the connection information you can update.
159
+
The connections for Tableau Server data sources and workbooks are represented by a `ConnectionItem` class. You can call data source and workbook methods to query or update the connection information. The `ConnectionCredentials` class represents the connection information you can update.
160
160
161
161
### ConnectionItem class
162
162
@@ -178,9 +178,9 @@ Name | Description
178
178
`connection_type` | The type of connection.
179
179
`username` | The username for the connection.
180
180
`password` | The password used for the connection.
181
-
`embed_password` | (Boolean) Determines whether to embed the passowrd (`True`) for the workbook or data source connection or not (`False`).
181
+
`embed_password` | (Boolean) Determines whether to embed the password (`True`) for the workbook or data source connection or not (`False`).
182
182
`server_address` | The server address for the connection.
Using the TSC library, you can get all the data sources on a site, or get the data sources for a specific project.
223
-
The data source resources for Tableau Server are defined in the `DatasourceItem` class. The class corresponds to the data source resources you can access using the Tableau Server REST API. For example, you can gather information about th
23D3
e name of the data source, its type, and connections, and the project it is associated with. The data source methods are based upon the endpoints for data sources in the REST API and operate on the `DatasourceItem` class.
223
+
The data source resources for Tableau Server are defined in the `DatasourceItem` class. The class corresponds to the data source resources you can access using the Tableau Server REST API. For example, you can gather information about the name of the data source, its type, its connections, and the project it is associated with. The data source methods are based upon the endpoints for data sources in the REST API and operate on the `DatasourceItem` class.
224
224
225
225
<br>
226
226
@@ -318,7 +318,7 @@ Name | Description
318
318
:--- | :---
319
319
`datasource_id` | The identifier (`id`) for the the `DatasourceItem` that you want to download from the server.
320
320
`filepath` | (Optional) Downloads the file to the location you specify. If no location is specified (the default is `Filepath=None`), the file is downloaded to the current working directory.
321
-
`no_extract` | (Optional) Specifies whether to download the file without the extract. When the data source has an extract, if you set the parameter `no_extract=True`, the extract is not included. You can use this parameter to improve performance if you are downloading data sources that have large extracts. The default is to include the extract, if present (`no_extract=False`).
321
+
`no_extract` | (Optional) Specifies whether to download the file without the extract. When the data source has an extract, if you set the parameter `no_extract=True`, the extract is not included. You can use this parameter to improve performance if you are downloading data sources that have large extracts. The default is to include the extract, if present (`no_extract=False`). Available starting with Tableau Server REST API version 2.5.
322
322
323
323
**Exceptions**
324
324
@@ -546,7 +546,8 @@ The `DatasourceItem` for the data source that was added or appened to.
@@ -667,7 +670,7 @@ The group resources for Tableau Server are defined in the `GroupItem` class. The
667
670
GroupItem(name)
668
671
```
669
672
670
-
The `GroupItem` class contains the members or attributes for the view resources on Tableau Server. The `GroupItem` class defines the information you can request or query from Tableau Server. The class members correspond to the attributes of a server request or response payload.
673
+
The `GroupItem` class contains the attributes for the group resources on Tableau Server. The `GroupItem` class defines the information you can request or query from Tableau Server. The class members correspond to the attributes of a server request or response payload.
671
674
672
675
Source file: models/group_item.py
673
676
@@ -686,6 +689,8 @@ Name | Description
686
689
687
690
```py
688
691
newgroup =TSC.GroupItem('My Group')
692
+
693
+
# call groups.create() with new group
689
694
```
690
695
691
696
@@ -735,17 +740,17 @@ None.
735
740
736
741
```py
737
742
# Adding a user to a group
738
-
# Using the second group on the site, aleady have all_groups
743
+
#
744
+
# get the group item
745
+
all_groups, pagination_item = server.groups.get()
746
+
mygroup = all_groups[1]
747
+
739
748
# The id for Ian is '59a8a7b6-be3a-4d2d-1e9e-08a7b6b5b4ba'
# print the information about the first connection item
947
+
# print the names of the users
943
948
for user in mygroup.users :
944
949
print(user.name)
945
950
@@ -2806,7 +2811,7 @@ Name | Description
2806
2811
:---| :---
2807
2812
`workbook_id`| The IDfor the the `WorkbookItem` that you want to download from the server.
2808
2813
`filepath`| (Optional) Downloads the file to the location you specify. If no location is specified, the fileis downloaded to the current working directory. The default is`Filepath=None`.
2809
-
`no_extract`| (Optional) Specifies whether to download the file without the extract. When the workbook has an extract, if you set the parameter `no_extract=True`, the extract isnot included. You can use this parameter to improve performance if you are downloading workbooks that have large extracts. The default is to include the extract, if present (`no_extract=False`).
2814
+
`no_extract`| (Optional) Specifies whether to download the file without the extract. When the workbook has an extract, if you set the parameter `no_extract=True`, the extract isnot included. You can use this parameter to improve performance if you are downloading workbooks that have large extracts. The default is to include the extract, if present (`no_extract=False`). Available starting with Tableau Server RESTAPI version 2.5.
0 commit comments