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
{{ message }}
Repository navigation
Commit d04bf1f
Browse filesBrowse the repository at this point in the historyBrowse files
Document that publish server_address matches connections rather than changing them (#1903)
* Document that publish server_address matches connections rather than changing them
Users passing a ConnectionItem with a new server_address to
workbooks.publish expected the published connection to point at that
server, and got error 403007 instead. The server uses server_address to
find the matching connection embedded in the workbook file; it does not
change it. Explain this, show how to change the address afterwards with
workbooks.update_connection, and correct the ConnectionItem
server_address description (it is the data source host, not the Tableau
Server host).
Closes#337
Co-Authored-By: Claude Code <noreply@anthropic.com>
* Correct workbooks.publish and update_connection reference entries
The publish signature listed file_path and publish_mode (the parameters
are file and mode) and omitted the parameters argument and defaults, a
parameter description repeated workbook_item twice, and
workbooks.update_connection was documented as returning None when it
returns the updated ConnectionItem.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* Remove the unverified 403007 claim from the workbooks.publish note
Co-Authored-By: Claude Code <noreply@anthropic.com>
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/api-ref.md
+26-5Lines changed: 26 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -679,7 +679,7 @@ Name | Description
679
679
`username` | The username for the connection (see ConnectionCredentials).
680
680
`password` | The password used for the connection (see ConnectionCredentials).
681
681
`embed_password` | (Boolean) Determines whether to embed the password (`True`) for the workbook or data source connection or not (`False`) (see ConnectionCredentials).
682
-
`server_address` | The server address for the connection (host name for the Tableau Server).
682
+
`server_address` | The server address for the connection (host name of the data source server). When publishing a workbook, this identifies which embedded connection the credentials apply to and does not change it; use `workbooks.update_connection` to change it after publishing.
683
683
`server_port` | The port used for the connection.
684
684
`connection_credentials` | The Connection Credentials object containing authentication details for the connection. Replaces username/password/embed_password when publishing a flow, document or workbook file in the request body.
685
685
`workgroup_auth_mode` | (Optional) The Workload Identity Federation (WIF) auth mode for the connection. Set to one of the values on the `ConnectionItem.WorkgroupAuthMode` nested value set: `WIF` (`"workload-identity-federation"`, e.g. Snowflake direct WIF) or `WIF_IMPERSONATION` (`"workload-identity-federation-impersonation"`, e.g. Google BigQuery impersonation WIF). Requires REST API 3.30+ (Tableau Server release 26.3) with WIF configured on the site. Older servers silently ignore the attribute.
`workbook_item` | The `workbook_item` specifies the workbook you are publishing. When you are adding a workbook, you need to first create a new instance of a `workbook_item` that includes a `project_id` of an existing project. The name of the workbook will be the name of the file, unless you also specify a name for the new workbook when you create the instance. See [WorkbookItem](#workbookitem-class).
10410
-
`file` | The file path or file object of the workbook to publish. When providing a file object, you must also specifiy the name of the workbook in your instance of the `workbook_item``workbook_item`, as the name cannot be derived from the file name.
10410
+
`file` | The file path or file object of the workbook to publish. When providing a file object, you must also specifiy the name of the workbook in your instance of the `workbook_item`, as the name cannot be derived from the file name.
10411
10411
`mode` | Specifies whether you are publishing a new workbook (`CreateNew`) or overwriting an existing workbook (`Overwrite`). You cannot appending workbooks. You can also use the publish mode attributes, for example: `TSC.Server.PublishMode.Overwrite`.
10412
-
`connections` | List of `ConnectionItems` objects for the connections created within the workbook.
10412
+
`connections` | List of `ConnectionItems` objects that supply credentials for the connections embedded in the workbook. The `server_address` of each item is used to find the matching connection in the workbook file; it does not change the connection's server address. See the note below.
10413
10413
`skip_connection_check` | (Optional) Set to `True` to skip connection check at time of upload. Publishing will succeed but unchecked connection issues may result in a non-functioning workbook. Defaults to `False`.
10414
10414
`as_job` | (Optional) Set to `True` to run the upload as a job (asynchronous upload). If set to `True` a job will start to perform the publishing process and a `Job` object is returned. Defaults to `False`.
10415
10415
10416
+
**Note:** When you publish, the `server_address` of each `ConnectionItem` in `connections` identifies which connection embedded in the workbook file the credentials belong to. It does not change the server address of that connection; the workbook is published with the server address saved in the file. If `server_address` does not match a connection in the file, the credentials are not applied. To point an embedded connection at a different server, publish the workbook first and then call [workbooks.update_connection](#workbooksupdate_connection). See the second example below.
10417
+
10416
10418
10417
10419
10418
10420
**Exceptions**
@@ -10448,6 +10450,25 @@ with server.auth.sign_in(tableau_auth):
0 commit comments