From 774dafb8a4df7b13a5d49baf5610d057c110c439 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Mon, 5 Jan 2026 22:23:22 -0800 Subject: [PATCH 1/3] Add docs for batch create schedule --- docs/api-ref.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/docs/api-ref.md b/docs/api-ref.md index aebe7995a..d57d73139 100644 --- a/docs/api-ref.md +++ b/docs/api-ref.md @@ -3068,6 +3068,68 @@ hourly_schedule = server.schedules.create(hourly_schedule)
+#### schedules.batch_create + +```py +schedules.batch_create(schedule_items) +``` +Creates multiple new schedules for extract refresh or subscription in a single request. + +REST API: [Batch Create Schedules](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#batch_create_schedules) + + +**Parameters** + +Name | Description +:--- | :--- +`schedule_items` | A list of `ScheduleItem` objects that you want to create. Each `ScheduleItem` includes the `IntervalItem` which specifies the frequency, or interval, that the schedule should run. + + +**Returns** + +Returns a list of newly created `ScheduleItem` instances. + + +**Exceptions** + +Error | Description +:--- | :--- +`Interval item must be defined.` | Raises an exception if any `schedule_item.interval_item` is not specified. The interval item specifies whether the interval is hourly, daily, weekly, or monthly. + + +**Example** + +```py +import tableauserverclient as TSC +from datetime import time + +# sign in, etc. + +# Create multiple schedule items +hourly_interval = TSC.HourlyInterval(start_time=time(2, 30), + end_time=time(23, 0), + interval_value=2) +hourly_schedule = TSC.ScheduleItem("Hourly-Schedule", + 50, + TSC.ScheduleItem.Type.Extract, + TSC.ScheduleItem.ExecutionOrder.Parallel, + hourly_interval) + +daily_interval = TSC.DailyInterval(start_time=time(0, 30)) +daily_schedule = TSC.ScheduleItem("Daily-Schedule", + 60, + TSC.ScheduleItem.Type.Subscription, + TSC.ScheduleItem.ExecutionOrder.Serial, + daily_interval) + +# Batch create multiple schedules +created_schedules = server.schedules.batch_create([hourly_schedule, daily_schedule]) +``` + +
+
+ + #### schedules.delete ```py From baafafd6d04ef9a15566045af338c56ef3e78cdd Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Tue, 6 Jan 2026 08:14:43 -0800 Subject: [PATCH 2/3] Revert "Add docs for batch create schedule" This reverts commit 774dafb8a4df7b13a5d49baf5610d057c110c439. --- docs/api-ref.md | 62 ------------------------------------------------- 1 file changed, 62 deletions(-) diff --git a/docs/api-ref.md b/docs/api-ref.md index d57d73139..aebe7995a 100644 --- a/docs/api-ref.md +++ b/docs/api-ref.md @@ -3068,68 +3068,6 @@ hourly_schedule = server.schedules.create(hourly_schedule)
-#### schedules.batch_create - -```py -schedules.batch_create(schedule_items) -``` -Creates multiple new schedules for extract refresh or subscription in a single request. - -REST API: [Batch Create Schedules](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#batch_create_schedules) - - -**Parameters** - -Name | Description -:--- | :--- -`schedule_items` | A list of `ScheduleItem` objects that you want to create. Each `ScheduleItem` includes the `IntervalItem` which specifies the frequency, or interval, that the schedule should run. - - -**Returns** - -Returns a list of newly created `ScheduleItem` instances. - - -**Exceptions** - -Error | Description -:--- | :--- -`Interval item must be defined.` | Raises an exception if any `schedule_item.interval_item` is not specified. The interval item specifies whether the interval is hourly, daily, weekly, or monthly. - - -**Example** - -```py -import tableauserverclient as TSC -from datetime import time - -# sign in, etc. - -# Create multiple schedule items -hourly_interval = TSC.HourlyInterval(start_time=time(2, 30), - end_time=time(23, 0), - interval_value=2) -hourly_schedule = TSC.ScheduleItem("Hourly-Schedule", - 50, - TSC.ScheduleItem.Type.Extract, - TSC.ScheduleItem.ExecutionOrder.Parallel, - hourly_interval) - -daily_interval = TSC.DailyInterval(start_time=time(0, 30)) -daily_schedule = TSC.ScheduleItem("Daily-Schedule", - 60, - TSC.ScheduleItem.Type.Subscription, - TSC.ScheduleItem.ExecutionOrder.Serial, - daily_interval) - -# Batch create multiple schedules -created_schedules = server.schedules.batch_create([hourly_schedule, daily_schedule]) -``` - -
-
- - #### schedules.delete ```py From 4a9a1cd0c55d05b518726afe3cf984f3b9bfd6b3 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Tue, 6 Jan 2026 09:00:15 -0800 Subject: [PATCH 3/3] Add docs for schedules batch update state --- docs/api-ref.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/api-ref.md b/docs/api-ref.md index aebe7995a..0976a9b98 100644 --- a/docs/api-ref.md +++ b/docs/api-ref.md @@ -3229,6 +3229,53 @@ monthly_schedule = TSC.ScheduleItem("Monthly-Schedule", monthly_schedule = server.schedules.create(monthly_schedule) ``` +#### schedules.batch_update_state + +```py +schedules.batch_update_state(schedules, state, update_all=False) +``` + +Batch update the status of one or more schedules. If `update_all` is set to `True`, all schedules on the Tableau Server are affected. + +REST API: [Batch Update Schedule State](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_jobs_tasks_and_schedules.htm#batch_update_schedule_state) + +**Version** + +This endpoint is available with REST API version 3.27 and up. + +**Parameters** + +| Name | Description | +| :----------- | :-------------------------------------------------------------------------------------------------------------------------------------- | +| `schedules` | (Optional) An iterable of `ScheduleItem` objects or schedule ID strings to be updated. If `update_all=True`, this parameter is ignored. | +| `state` | The state to set for the schedules. Must be either `"active"` or `"suspended"`. | +| `update_all` | (Optional) If set to `True`, applies the state to all schedules on the server. Defaults to `False`. | + +**Returns** + +A list of strings containing the IDs of the affected schedules. + +**Example** + +```py +import tableauserverclient as TSC +# sign in, etc. + +# Get schedules to update +schedules, pagination = server.schedules.get() +schedules_to_update = [schedules[0], schedules[1], schedules[2]] + +# Batch update schedules to active state +affected_ids = server.schedules.batch_update_state(schedules_to_update, "active") + +# Or update using schedule ID strings +schedule_ids = ["593d2ebf-0d18-4deb-9d21-b113a4902583", + "cecbb71e-def0-4030-8068-5ae50f51db1c"] +affected_ids = server.schedules.batch_update_state(schedule_ids, "suspended") + +# Update all schedules on the server +all_affected_ids = server.schedules.batch_update_state([], "active", update_all=True) +```