đ 4 min read
Downloads a custom view(associated linked custom views) in .json format.
Security note: Content in .json files downloaded using this method is stored in plain text. All data, including filter values that might give semantic clues to the data, is readable by anyone who opens the files.
URI
GET /api/*api-version*/sites/*site-id*/customviews/*customview-id*/content
Parameter values
| Parameter | Description |
|---|---|
| api-version | The version of the API to use, such as 3.18. For more information, see REST API and Resource Versions. The supported version for this API is exp |
| site-id | The ID of the site that contains the custom view. |
| customview-id | The ID of the custom view to download. |
Request Body
None
Permissions
Tableau Server users who are server administrators or site admins can download a custom view.
Response Code
200
Response Body
The custom viewâs content along with some metadata required for import in .json format (Content-Type: application/octet-stream)
The response has the following content disposition header:
Content-Disposition: name="tableau_customview"; filename="customview-filename"
Version
3.21
Errors
| HTTP status | Error Code | Condition | Details |
|---|---|---|---|
| 403 | 403163 | Download forbidden | Non-admin user or admin user without the ExportXml permissions attempted to download the custom view. |
| 404 | 404000 | Site not found | The site ID in the URI doesnât correspond to an existing site. |
| 404 | 404048 | Custom view not found | The custom view ID in the URI doesnât correspond to an existing custom view. |
| 405 | 405000 | Invalid request method | The request type wasnât GET. |
For more information, see Handling Errors.
Example
curl "http://MY-SERVER/api/3.21/sites/ \
9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d/customviews/ \
1a1b1c1d-2e2f-2a2b-3c3d-3e3f4a4b4c4d/content" \
-X GET -H "X-Tableau-Auth:12ab34cd56ef78ab90cd12ef34ab56cd" \
> c:\files\my-customview.twbx
The response is a file that contains the custom view.