-
Notifications
You must be signed in to change notification settings - Fork 448
docs: document custom_views endpoint #1759
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -652,6 +652,115 @@ See [CustomViewItem class](#customviewitem-class) | |||||||||||
| <br> | ||||||||||||
| <br> | ||||||||||||
|
|
||||||||||||
| #### custom_views.download | ||||||||||||
|
|
||||||||||||
| ```py | ||||||||||||
| custom_views.download(view_item, file) | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| Downloads the definition of a custom view as JSON to a file path or file object. The downloaded file may contain sensitive information. | ||||||||||||
|
|
||||||||||||
| **Version** | ||||||||||||
|
|
||||||||||||
| This endpoint is available with REST API version 3.21 and up. | ||||||||||||
|
|
||||||||||||
| **Parameters** | ||||||||||||
|
|
||||||||||||
| | Name | Description | | ||||||||||||
| | :---------- | :----------------------------------------------------------------------------------- | | ||||||||||||
| | `view_item` | The `CustomViewItem` to download. | | ||||||||||||
| | `file` | The file path (`str` or `Path`) or writable file object to write the definition to. | | ||||||||||||
|
|
||||||||||||
| **Returns** | ||||||||||||
|
|
||||||||||||
| Returns the file path or file object that the custom view definition was written to. | ||||||||||||
|
|
||||||||||||
| **Example** | ||||||||||||
|
|
||||||||||||
| ```py | ||||||||||||
|
||||||||||||
| ```py | |
| ```py | |
| # Sign in to Tableau Server or Tableau Cloud first and create `server`. |
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a REST API reference link for custom_views.publish, consistent with the other custom_views.* method docs in this section.
| **REST API reference** | |
| [Publish Custom View](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#publish_custom_view) |
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In custom_views.publish docs, the parameter description says view_item must have name set, but the Exceptions section implies this is only required in certain cases ("when passing a file object"). Please clarify the actual requirement so the docs are internally consistent.
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The custom_views.publish example uses TSC.CustomViewItem but does not import tableauserverclient as TSC, and it references server without setup. Add the import and either include sign-in/server initialization or a clear comment indicating those steps are assumed.
| ```py | |
| ```py | |
| import tableauserverclient as TSC | |
| # Assumes `server` is an already initialized and signed-in TSC.Server instance. |
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
custom_views.filter is missing the **Version** section used by the other custom_views.* methods. If this is backed by a specific REST API version, document it; if it’s a client-side convenience helper, explicitly say so (and add a REST API link only if applicable).
| **Version** | |
| This is a client-side convenience helper provided by TSC. It is not a direct Tableau REST API method. For related REST API functionality, see the [Custom Views methods](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_workbooks_and_views.htm#custom_views). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a REST API reference link for
custom_views.download, consistent with the othercustom_views.*method docs (e.g.,custom_views.deleteincludes aREST API:line).