Loading

Recycle Bin feature on Tableau Cloud and Tableau Server

Udgivelsesdato: Sep 25, 2025
Beskrivelse

With Recycle Bin enabled in a site, deleting content items of the supported content types (workbook, data source) now, by default, no longer permanently deletes the item. Instead, the content item is now placed in the Recycle Bin. Consequently, the content item continues to exist in the system until it is permanently deleted after the number of days the content can be stored in the Recycle Bin, which can be configured to 1, 7 or 30 days. Since the content item still exists, it retains its original content URL for this retention period. Thus, publishing another content item of the same type (e.g. workbook) with the same name will necessarily result in the new item being assigned a different content URL. This is the standard behavior encountered when publishing content with already existing names, but users may encounter this behavior more frequently given that content items are retained in the system after deleting.

Løsning

Option 1: Consult the REST API response to determine the content URL

Scripts should always consult the REST API response when publishing a workbook or data source to determine the content URL assigned to the newly created item. Scripts should not assume that the content URL will be the same for an identically named item since the content URL may already be assigned to an item in the Recycle Bin.

Example: Publishing a workbook 

POST /api/api-version/sites/site-id/workbooks

Request body:

--boundary-string
Content-Disposition: name="request_payload"
Content-Type: text/xml
<tsRequest>
<workbook name="workbook-name" showTabs="show-tabs-flag" description="workbook-description" thumbnailsUserId="user-luid">
<connections>
<connection serverAddress="server-address" serverPort="port-number">
<connectionCredentials name="connection-username" password="connection-password"
embed="embed-flag" />
</connection>
</connections>
<project id="project-id"/>
</workbook>
</tsRequest>
--boundary-string
Content-Disposition: name="tableau_workbook"; filename="workbook-file-name"
Content-Type: application/octet-stream
content-of-workbook-file
--boundary-string--

Response body:

<tsResponse>
<workbook
id="workbook-id"
name="workbook-name"
contentUrl="site-content-url"
webpageUrl="server-address"
showTabs="show-tabs-flag"
size="num-size"
createdAt="workbook-publish-date-time"
updatedAt="workbook-update-date-time"
encryptExtracts="encryptExtracts" >
<project id="project-id" name="project-name"/>
<owner id="workbook-owner-id"/>
<tags/>
<views>
<view
id="view-id"
name="view-name"
contentUrl="view-content-url"
createdAt="view-publish-date-time"
updatedAt="view-update-date-time" >
<tags/>
</view>
<materializedViewsEnablementConfig materializedViewsEnabled="materialized-views-enabled-flag"/>
</workbook>
</tsResponse>

The workbook’s correct content URL is included in the REST API response.

Option 2: Overwrite content instead of deleting it and immediately republishing it

Another approach is to identify why content is being deleted and then almost immediately being restored. If the intent is to maintain the content URL of the item, then consider not deleting it and instead publish a new version of the item. This can be achieved by using the overwrite flag in the REST API 

POST /api/api-version/sites/site-luid/datasources?overwrite=overwrite-flag

This is the correct way to retain an item’s content URL since this is publishing a new version of an existing item.

 

Vidensartikelnummer

004577009

 
Indlæser
Salesforce Help | Article