Create a Schedule from a Working Template

Create and edit a disabled single-report schedule using a working Tableau schedule as its template.

Create a new schedule from a working Tableau schedule, change its settings and verify the report before enabling recurring delivery.

This workflow keeps the template’s Tableau resource, parameter types and rendering settings. It creates a separate non-data-driven schedule with a test disk destination. It does not change the original schedule.

Before you begin

Complete Authentication and Token Management. The PowerShell examples use $AtrsBaseUrl and $AtrsHeaders from that guide. Run the steps in order in the same PowerShell session. Use your installation’s address and identifiers in place of the examples.

You need:

  • A working non-data-driven single-report schedule as the template.
  • An existing ATRS folder for the new schedule.
  • A unique new name and a test output folder on the executing ATRS server.
  • Write access to that output folder for the execution account.

Keep the new schedule disabled while checking it. Use a working schedule as the template rather than the GetSample response, which does not provide the complete settings needed by this workflow.

Understand the definition

PartPurpose
Tableau account, item and URLPreserve the template’s reporting resource.
ParametersPreserve the selected values and types.
ClientRenderingSettingsConfigure rendering in single-schedule create/update requests.
ScheduleConfigure recurrence and enabled state.
Destination arraysInclude every email and disk destination that should remain.

A saved schedule response can omit settings. Keep the complete request definition separately for later edits.

1. Select the template and new destination

Retrieve the template with GET /api/SingleSchedule/Get, then enter values for the new schedule:

$AtrsSourceId = [long](Read-Host "Working non-data-driven single schedule ID")
$AtrsBaseline = Invoke-RestMethod -Method Get -Uri "$AtrsBaseUrl/api/SingleSchedule/Get?Id=$AtrsSourceId" -Headers $AtrsHeaders -TimeoutSec 30
if ($AtrsBaseline.IsDataDriven) { throw "This workflow requires a non-data-driven baseline" }
if ($null -eq $AtrsBaseline.ClientRenderingSettings -or [string]::IsNullOrWhiteSpace($AtrsBaseline.ReportUrl) -or [string]::IsNullOrWhiteSpace($AtrsBaseline.TableauAccountId)) { throw "Baseline lacks required settings" }
$AtrsCopyName = Read-Host "Unique new schedule name"
$AtrsCopyFolder = Read-Host "Existing ATRS folder path"
$AtrsTestOutput = Read-Host "Controlled server-side disk output folder"
if ([string]::IsNullOrWhiteSpace($AtrsCopyName) -or [string]::IsNullOrWhiteSpace($AtrsCopyFolder) -or [string]::IsNullOrWhiteSpace($AtrsTestOutput)) { throw "Complete all three values" }

2. Prepare the new definition

This example uses disabled daily recurrence and PDF output:

$AtrsDefinition = [ordered]@{
    ScheduleName=$AtrsCopyName
     FolderPath=$AtrsCopyFolder
     UniqueId=0
    Description="Controlled API copy"
     Keywords="API test"
     IsDataDriven=$false
    TableauAccountId=$AtrsBaseline.TableauAccountId
    TableauItemId=$AtrsBaseline.TableauItemId
    ReportUrl=$AtrsBaseline.ReportUrl
     ReportName=$AtrsBaseline.ReportName
    ObjectType=[string]$AtrsBaseline.ObjectType
    ClientRenderingSettings=$AtrsBaseline.ClientRenderingSettings
    Parameters=@($AtrsBaseline.Parameters | Where-Object { $null -ne $_ } | ForEach-Object { @{Name=$_.Name
     Value=$_.Value
     Type=$_.Type} })
    Schedule=@{Frequency="Daily"
     StartDate=(Get-Date).AddDays(1).ToString("yyyy-MM-dd")
     EndDate=(Get-Date).AddYears(10).ToString("yyyy-MM-dd")
     ExecutionTime="09:00"
     HasEndDate=$false
     Repeat=$false
     RepeatInterval=0
     RepeatUnit="hour"
     RepeatUntil="00:00"
     Enabled=$false
     ScheduleId=0}
    EmailDestinations=@()
    DiskDestinations=@(@{DestinationName="Controlled test disk"
     DestinationId=0
     DestinationType="Disk"
     OutputFormat="Acrobat Format (*.pdf)"
     CustomOutputFileName=""
     CustomOutputExtension=""
     Enabled=$true
     OutputPath=$AtrsTestOutput})
}

Use the output-format label accepted by your Tableau workflow. The example supplies a valid EndDate even with HasEndDate=false; keep a valid date in the request. Review local schedule time and recurrence in ATRS before enabling delivery.

3. Create and inspect the schedule

Save the intended definition, send POST /api/SingleSchedule/Create once, and retrieve the returned ID:

$AtrsDefinitionPath = Join-Path (Get-Location) ("atrs-definition-"+[guid]::NewGuid().ToString()+".json")
$AtrsDefinition | ConvertTo-Json -Depth 100 | Set-Content -LiteralPath $AtrsDefinitionPath -Encoding UTF8 -ErrorAction Stop
$AtrsCreated = Invoke-RestMethod -Method Post -Uri "$AtrsBaseUrl/api/SingleSchedule/Create" -Headers $AtrsHeaders -ContentType "application/json" -Body ($AtrsDefinition | ConvertTo-Json -Depth 100) -TimeoutSec 60
$AtrsNewId = [long]$AtrsCreated.UniqueId
if ($AtrsNewId -le 0) { throw "Missing created ID; reconcile by unique name and folder before retrying" }
$AtrsDefinition.UniqueId=$AtrsNewId
$AtrsDefinition | ConvertTo-Json -Depth 100 | Set-Content -LiteralPath $AtrsDefinitionPath -Encoding UTF8 -ErrorAction Stop
$AtrsSaved = Invoke-RestMethod -Method Get -Uri "$AtrsBaseUrl/api/SingleSchedule/Get?Id=$AtrsNewId" -Headers $AtrsHeaders -TimeoutSec 30
$AtrsSaved | ConvertTo-Json -Depth 100
if ($AtrsSaved.Schedule.Enabled -ne $false -or $AtrsSaved.ScheduleName -ne $AtrsCopyName) { throw "Read-back disagrees; inspect ATRS before proceeding" }

The create response contains UniqueId. Retain it and the printed definition-file path. Inspect the saved account, item, parameters, rendering, recurrence and disk destination in the returned JSON and ATRS.

If submission times out, locate the new schedule by its unique name, folder and submission time before trying again.

4. Update the new schedule

In the same session, transfer its assigned recurrence and destination identifiers into the intended definition, change the description and submit POST /api/SingleSchedule/Update:

$AtrsDefinition.Schedule=$AtrsSaved.Schedule
$AtrsDefinition.Schedule.Enabled=$false
$AtrsDefinition.EmailDestinations=@($AtrsSaved.EmailDestinations | Where-Object { $null -ne $_ })
$AtrsDefinition.DiskDestinations=@($AtrsSaved.DiskDestinations | Where-Object { $null -ne $_ })
$AtrsDefinition.Description="Controlled API copy, update checked"
$AtrsDefinition | ConvertTo-Json -Depth 100 | Set-Content -LiteralPath $AtrsDefinitionPath -Encoding UTF8 -ErrorAction Stop
Invoke-RestMethod -Method Post -Uri "$AtrsBaseUrl/api/SingleSchedule/Update" -Headers $AtrsHeaders -ContentType "application/json" -Body ($AtrsDefinition | ConvertTo-Json -Depth 100) -TimeoutSec 60
$AtrsSaved = Invoke-RestMethod -Method Get -Uri "$AtrsBaseUrl/api/SingleSchedule/Get?Id=$AtrsNewId" -Headers $AtrsHeaders -TimeoutSec 30
if ($AtrsSaved.Description -ne $AtrsDefinition.Description -or $AtrsSaved.Schedule.Enabled -ne $false) { throw "Update did not pass read-back checks" }

Successful update returns HTTP 200 with an empty body. Read the schedule independently to verify the change. Include complete destination arrays; omitting a retained destination can remove it.

Continue in a new PowerShell session

Authenticate again, then reload the saved intended definition and schedule:

$AtrsDefinitionPath = Read-Host "Path to the saved schedule definition"
$AtrsDefinition = Get-Content -LiteralPath $AtrsDefinitionPath -Raw | ConvertFrom-Json
$AtrsNewId = [long]$AtrsDefinition.UniqueId
if ($AtrsNewId -le 0) { throw "The saved definition has no created schedule ID" }
$AtrsSaved = Invoke-RestMethod -Method Get `
    -Uri "$AtrsBaseUrl/api/SingleSchedule/Get?Id=$AtrsNewId" -Headers $AtrsHeaders -TimeoutSec 30

Check for changes made in ATRS or another application before submitting a full update. This procedure assumes you control the new test copy; it is not a general merge strategy for concurrent edits.

5. Test the report

Run the Quick Start with the new schedule ID. Open the PDF and check content, parameters, page layout and output folder.

Use Configure Tableau Parameters and Rendering and Manage Destinations and Output Settings for further edits.

6. Enable recurring delivery when ready

If recurring delivery is intended, use the enable operation with UniqueId set to the new ID and ScheduleType set to report. Follow the complete request example in Schedule Lifecycle Reference.

Read the schedule again and confirm enabled state, next run, local time and intended destinations in ATRS. Otherwise leave the test copy disabled.

Troubleshooting

SymptomWhat to check
Template rejectedIt must be non-data-driven with a valid account, URL and client rendering settings.
Create failsExisting folder, valid recurrence dates and a destination writable by the service.
Settings disappear after updateFull intended definition, complete arrays and retained identifiers.
Request succeeds but output is wrongTest the selected view, parameters, rendering and execution account separately.

Did this page help you?