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/api-ref.md
+62-14Lines changed: 62 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -256,10 +256,8 @@ The `ConnectionCredentials` class is used for workbook and data source publish r
256
256
Attribute | Description
257
257
:--- | :---
258
258
`name` | The username for the connection.
259
-
`embed_password` | (Boolean) Determines whether to embed the password (`True`) for the workbook or data source connection or not (`False`).
259
+
`embed` | (Boolean) Determines whether to embed the password (`True`) for the workbook or data source connection or not (`False`).
260
260
`password` | The password used for the connection.
261
-
`server_address` | The server address for the connection.
262
-
`server_port` | The port used by the server.
263
261
`ouath` | (Boolean) Specifies whether OAuth is used for the data source of workbook connection. For more information, see [OAuth Connections](https://help.tableau.com/current/server/en-us/protected_auth.htm).
264
262
265
263
@@ -562,7 +560,7 @@ None. A list of `ConnectionItem` objects are added to the data source (`datasour
`datasource_item` | The `datasource_item` specifies the new data source you are adding, or the data source you are appending to. If you are adding a new data source, you need to create a new `datasource_item` with a `project_id` of an existing project. The name of the data source will be the name of the file, unless you also specify a name for the new data source when you create the instance. See [DatasourceItem](#datasourceitem-class).
579
-
`file_path` | The path and name of the data source to publish.
577
+
`file` | The file path or file object of the data source to publish.
580
578
`mode` | Specifies whether you are publishing a new data source (`CreateNew`), overwriting an existing data source (`Overwrite`), or appending data to a data source (`Append`). If you are appending to a data source, the data source on the server and the data source you are publishing must be be extracts (.tde files) and they must share the same schema. You can also use the publish mode attributes, for example: `TSC.Server.PublishMode.Overwrite`.
581
579
`connection_credentials` | (Optional) The credentials required to connect to the data source. The `ConnectionCredentials` object contains the authentication information for the data source (user name and password, and whether the credentials are embedded or OAuth is used).
580
+
`as_job` | (Optional) If this value is set to `True`, the publish operation will be asynchronous and return a JobItem.
`id` | The identifier for the schedule. Use the `schedules.get()` method to get the identifiers of the schedules on the server.
2657
+
`priority` | The priority of the schedule (integer). Lower values represent higher priorities, with `0` indicating the highest priority.
2659
2658
`schedule_type` | The type of task. The types are either an `Extract` for an extract refresh task or a `Subscription` for a scheduled subscription.
2660
2659
`execution_order` | Specifies how the scheduled task should run. The choices are `Parallel`which uses all available background processes for this scheduled task, or `Serial`, which limits this schedule to one background process.
2661
2660
`interval_item` | Specifies the frequency that the scheduled task should run. The `interval_item` is an instance of the `IntervalItem` class. The `interval_item` has properties for frequency (hourly, daily, weekly, monthly), and what time and date the scheduled item runs. You set this value by declaring an `IntervalItem` object that is one of the following: `HourlyInterval`, `DailyInterval`, `WeeklyInterval`, or `MonthlyInterval`.
@@ -2683,10 +2682,59 @@ The schedule methods are based upon the endpoints for schedules in the REST API
Adds a `DatasourceItem`, `FlowItem`, or `WorkbookItem` to a schedule.
2692
+
2693
+
2694
+
REST API: [Add Data Source to Schedule](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_jobs_tasks_and_schedules.htm#add_data_source_to_schedule)
2695
+
2696
+
2697
+
2698
+
**Parameters**
2699
+
2700
+
Name | Description
2701
+
:--- | :---
2702
+
`schedule_id` | The identifier (id) of the schedule to add the data source or workbook to. Can be retrieved from a `ScheduleItem`, e.g., by performing `schedules.get()`.
2703
+
`workbook` | (Optional) A `WorkbookItem` that should be added to the schedule. Only provide either `workbook` or `datasource`, passing multiple items will be deprecated.
2704
+
`datasource` | (Optional) A `DatasourceItem` that should be added to the schedule. Only provide either `workbook` or `datasource`, passing multiple items will be deprecated.
2705
+
`flow` | (Optional) A `FlowItem` that should be added to the schedule. Only applicable if `workbook = None` and `datasource = None`.
2706
+
`task_type` | (Optional) Determines the type of task. One of `TaskItem.Type`: `ExtractRefresh`, `DataAcceleration`, `RunFlow`.
2707
+
2708
+
2709
+
**Returns**
2710
+
Returns a List of `AddResponses`.
2711
+
2712
+
2713
+
**Example**
2714
+
2715
+
```py
2716
+
import tableauserverclient asTSC
2717
+
# sign in, etc.
2718
+
# get a datasource item that should be added to a schedule
schedule_id = schedule_item.id # can be a freshly created schedule or one queried via `schedules.get()`
2723
+
2724
+
# Add the data source to the schedule
2725
+
server.schedules.add_to_schedule(
2726
+
schedule_id=schedule_id,
2727
+
datasource=datasource_item,
2728
+
)
2729
+
```
2730
+
<br>
2731
+
<br>
2732
+
2733
+
2734
+
#### schedules.create
2687
2735
2688
2736
```py
2689
-
schedule.create(schedule_item)
2737
+
schedules.create(schedule_item)
2690
2738
```
2691
2739
Creates a new schedule for an extract refresh or a subscription.
2692
2740
@@ -2731,10 +2779,10 @@ import tableauserverclient as TSC
2731
2779
<br>
2732
2780
2733
2781
2734
-
#### schedule.delete
2782
+
#### schedules.delete
2735
2783
2736
2784
```py
2737
-
schedule.delete(schedule_id)
2785
+
schedules.delete(schedule_id)
2738
2786
```
2739
2787
2740
2788
Deletes an existing schedule for an extract refresh or a subscription.
@@ -2762,10 +2810,10 @@ Error | Description
2762
2810
`Schedule ID undefined` | The identifier is not a valid identifier for a schedule on the server.
2763
2811
2764
2812
2765
-
#### schedule.get
2813
+
#### schedules.get
2766
2814
2767
2815
```py
2768
-
schedule.get([req_options=None])
2816
+
schedules.get([req_options=None])
2769
2817
```
2770
2818
2771
2819
Returns all schedule items from the server.
@@ -2781,7 +2829,7 @@ Name | Description
2781
2829
:--- | :---
2782
2830
`req_options` | (Optional) Additional request options to send to the endpoint.
2783
2831
2784
-
#### schedule.update
2832
+
#### schedules.update
2785
2833
2786
2834
<br>
2787
2835
<br>
@@ -5100,7 +5148,7 @@ Name | Description
5100
5148
`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).
5101
5149
`file_path` | The path and name of the workbook to publish.
5102
5150
`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`.
5103
-
`connections` | List of `ConnectionCredentials` objects for the connections created within the workbook.
5151
+
`connections` | List of `ConnectionItems` objects for the connections created within the workbook.
5104
5152
`connection_credentials` | (Optional) The credentials (if required) to connect to the workbook's data source. The `ConnectionCredentials` object contains the authentication information for the data source (user name and password, and whether the credentials are embedded or OAuth is used). **Deprecated since API server version 2.3.**
5105
5153
`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`.
5106
5154
`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`.
0 commit comments