Skip to content

SubscriptionItem.schedule_id is None after creation in Tableau Cloud #1627

@kareltv

Description

@kareltv

Describe the bug
When retrieving subscriptions using the TSC API on Tableau Online (Tableau Cloud), the SubscriptionItem.schedule_id field is always None, even for active subscriptions that were created with a valid schedule. This makes it impossible to update these subscriptions (e.g. suspend them), as the schedule ID is required for the update call.

Versions
Tableau: Tableau Online (Cloud)

Python: Python 3.11.10

TSC library: 0.38

To Reproduce

import tableauserverclient as TSC

tableau_auth = TSC.PersonalAccessTokenAuth(
    token_name=TOKEN_NAME,
    personal_access_token=TOKEN_SECRET,
    site_id=SITE_ID
)
server = TSC.Server(SERVER_URL, use_server_version=True)

with server.auth.sign_in(tableau_auth):
    all_subscriptions, pagination_item = server.subscriptions.get()
    for subscription in all_subscriptions:
        print(
            f"Subscription ID: {subscription.id}, "
            f"Name: {subscription.subject}, "
            f"Suspended: {subscription.suspended}, "
            f"Schedule ID: {subscription.schedule_id}, "  # Always None
            f"User ID: {subscription.user_id}"
        )

Outputs:

Subscription ID: abc, Name: test test, suspended: False, Schedule ID: None, user ID: abc

Results
Even though the subscription is active and was created using a valid schedule, the subscription.schedule_id is always None. This causes server.subscriptions.update(subscription) to fail with the following error:

404023: Resource Not Found
Schedule 'null' could not be found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions