From b2e6288cde315a3d3e7b2c04b8c1cdae711604b8 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Thu, 3 Dec 2020 15:52:28 -0800 Subject: [PATCH] Add explanation of method views.get_by_id() --- docs/api-ref.md | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/docs/api-ref.md b/docs/api-ref.md index f4edeb6ba..dbc2b0c93 100644 --- a/docs/api-ref.md +++ b/docs/api-ref.md @@ -3245,6 +3245,50 @@ for view in TSC.Pager(server.views): See [ViewItem class](#viewitem-class) +
+
+ +#### views.get_by_id +``` +views.get_by_id(view_id) +``` + +Returns the details of a specific view. + + +REST API: [Get View](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#get_view) + +**Version** + +This endpoint is available REST API version 3.1 and up. + +**Parameters** + +Name | Description +:--- | :--- +`view_id` | The ID of the view to retrieve. + + + +**Returns** + +Returns a single `ViewItem` object. + +**Example** + +```py +import tableauserverclient as TSC +tableau_auth = TSC.TableauAuth('username', 'password') +server = TSC.Server('https://servername') + +with server.auth.sign_in(tableau_auth): + view = server.view.get_by_id('d79634e1-6063-4ec9-95ff-50acbf609ff5') + print(view.name) +``` + +See [ViewItem class](#viewitem-class) + +

@@ -3347,7 +3391,7 @@ See [ViewItem class](#viewitem-class) #### views.populate_csv ``` -views.populate_csv(view_item) +views.populate_csv(view_item, req_options=None) ``` Populates the CSV data of the specified view.