Hi Jean Wang,
While I am not familiar with Rest API, I'm sure other members of our community would be glad to help you out!
Please note that we don't provide support for programs that customers create using the Tableau Rest API. If you need help with your code, please submit questions and ask for help on the Tableau developer community forums. I have moved your thread to the correct category.
Thanks for your understanding.
Lénaïc RIÉDINGER, Global Community Engineer Tableau
If you see a Helpful or Correct response, please mark it thanks to the buttons below the targeted post!
Please take a look at this post REST API Get Image with field parameter
Here, instead of using the REST method, we use a normal request, but are logging into the server using REST.
This means that you can add the :Refresh suffix to the URL to get the latest data
Hope this helps
Hi Jean Wang,
Currently, we do not have a way to invalidate the image cache from the rest api, but with Tableau 10.5 (in beta now), you can create a parameter that allows any value, and then you can use a timestamp for the value of the parameter. We use the view filters to match images in the cache, so it would allow you to get a fresh view.
To avoid wasting cache space, I'd recommend you only update the parameter value when you know that the data source has been updated.
In order to use the view filtering, you would take the name of your parameter, prepend vf_ to it, and then add it along with the value to the url on the GET call. For example:
Since this is a beta, please let us know if you have any questions or run into any problems.
actually allowing the user to invalidate the image cache (or explicitly force a refresh) seems like a reasonable feature to provide in the REST API. Any plans to do so? I mean, I'd argue it's a more intuitive and natural place to solve this, rather than adding an "artificial" filter to the workbook that does not add anything to the actual data viz side of things.