1 2 Previous Next 17 Replies Latest reply on Jun 28, 2016 3:28 PM by Ben Lower

    Tableau 10.0 Beta 2 Includes Major New APIs!

    Ben Lower

      We are stoked to finally take the wraps off of some new APIs! With the release of Tableau 10.0 Beta 2 we're introducing the following. Check out the demo videos, install Beta 2 to give everything a try, and let us know your thoughts.


      What's New in 10.0 Beta 2


      FeatureWhat it DoesLearn More
      getData()Part of the JavaScript API. Enables getting the summary and/or underlying data for a viz. Create your own custom vizzes alongside Tableau or make the data available to another program.

      Demo video




      Example code on GitHub

      Document APISupported path for anyone who wants to programmatically create and modify Tableau files. Currently only supports modifying .twb and .tds. This will evolve. Let us know what languages we should support next (currently Python only) and which parts of the files you want to modify.

      Demo video


      Code and examples on GitHub

      REST API Enhancements

      Multiple new endpoints and major enhancement called Filtering & Sorting:

      • New feature:  Filtering & Sorting. Currently enabled on ../workbooks and ../users endpoints only.
      • New endpoint:  ../sites/<siteID>/workbooks.  Use this to return all workbooks to which you have permissions.
      • New methods for working with revisions for workbooks and datasources.
      • New methods for working with schedules.
      • New methods for working with subscriptions.
      • New methods for working with a user's favorite datasources.
      • Support for working with multiple connections in a datasource.
      • Update Site now supports uploading new logo images.

      Demo video



      Web Data Connector v2

      We've rev'd the API to v2 which adds support for multiple tables. There's also a new Simulator and new docs on GitHub.


      Note: in Beta 2 we are not yet supporting WDC v2 in Tableau Desktop or Server...only in the new Simulator. A future beta will add support to Desktop/Server.

      Demo video





      Get Started

      Already signed up for Tableau beta? Get over to http://beta.tableau.com and get cracking!


      Not yet signed up for beta? Hit up http://tableau.com/getbeta to join in the fun


      Please let us know your feedback (the good, the bad, and the ugly) on the new APIs so we can continue working to improve them. Also, we're always interested to hear what you think we should do next (e.g. for the Filtering & Sorting what endpoints should we add).



      Tableau Developer Platform


      Message was edited by: ben lower (added link to new JS API docs)

        • 1. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
          Matthew Miller

          Hey Ben, I think this is a really good start to offering what the community wants from a Document API. As you help the community move from "XML hacking" to use of a proper, supported API for Tableau documents, could I suggest a few additions?


          Validation at the document level and at the "Tableau" level


          By this I mean: validate that the document is correct (valid XML) and matches the known format of the Tableau document for that target product version, then validate that the document in terms of acceptable Tableau content (are the data connection class types valid, do the columns added to the rows/columns shelves actually present in the datasource, etc.). In other words, both syntactic and semantic validation.




          The ability to target a specific version of the software is a must, especially for OEM customers. Therefore the API should expose different interfaces based on the version of the workbook / datasource we're targeting


          Support for Packaged Files


          I realize that unpacking/repacking a TWBX is trivial, but it's also boilerplate stuff we have to do in every solution unless it becomes core capability.


          Support for Files in Packaged Files


          Being able to tie the curiously named "Tableau SDK" aka Extract API into this project would help us complete the circle of offering data => TWBX capabilities for customers. To that end, we'd need to able to manipulate the packaged files through the API, even though this just means managing files in a ZIP. This is actually slightly more complicated, though, as we need to make sure the references in the TWB/TDS stay correct even as the files are replaced.


          Build-A-Sheet Workshop


          Another use case for the Document API is the creation of new worksheets and dashboard programmatically. This has actually been done before for and by Tableau customers but not widely publicized in the community. I could envision a fluent API for sheet creation.


          Support for Other Languages


          Java would be the next option, as it has strong support via JAXB for schema-validated XML. On the other hand, a pure JavaScript implementation would open up some interesting possibilities as well.


          Further Reading


          For inspiration and an example of a well-built third-party Document API for Tableau, I'd suggest looking at the Workbook SDK by InterWorks. Full disclosure: I had a small role in its creation. The so-called "Logical APIs" (my wording, and admittedly a confusing concept) are reorganizations of the TWB elements into objects that are easier to work with. For example, adding a Worksheet adds a Window element as well, as those are required. And you can manipulate Parameter objects directly, even though in the TWB these are stored as a special Datasource.

          So yeah, great work, great start, and looking forward to what's to come.

          3 of 3 people found this helpful
          • 2. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
            Ben Lower

            Matthew: thanks so much for taking the time to share your feedback! Validation & versioning are on the roadmap. TWBX and TDSX are things we’ll do. Java is our thinking too for the next language. We have talked to Interworks a couple times already about the Document API and look forward to working with them more ☺


            Can you please share more details about the “Support for Files in Packaged Files” and “Build-a-Sheet Workshop” use cases? Happy to jump on a call if that’s easier but I’d like to make sure I fully understand what you’d like to see there.



            • 3. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
              Matthew Miller

              They're a bit snooty about capitalizing the W; I'd watch out for that. ;-)


              The files in packaged workbooks include: Images, Data, Shadow Extracts (though I have no idea what we'd do with those), ummm...and I guess you could lump Shapes into that list (though those are base64-encoded and included in the TWB itself). If those were addressable through the API, it'd be a real timesaver.


              Build-a-Sheet Workshop. I'd love to be able to do like that Voyager project thing (Data Voyager) and turn a TDS into a TWB by creating all the vizzes that made sense for the dataset. This would mean a lot of "XML hacking," though, even with the aforementioned SDK. It'd be great if we could say "sheet.setDatasource(xyzDatasource).onColumns('some dimension').onColumns('some measure', 'running_sum').onRows('some dimension).asBarChart();" or similar.

              • 4. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                Robert Rouse

                I'm testing the getData API and have a working version that gets underlying data. The note above says we can also get summary data but I do not see that in the docs or example code. I swapped getUnderlyingDataAsync() for getSummaryDataAsync() and found it worked. I'd like to see docs on this method, including options available. Are they different than getUnderlyingDataAsync() options?


                In general with all the JavaScript API methods, It would be great to have a simpler way to call a specific worksheet. Right now for dashboards (which is pretty much everything I work with), I get the active sheet, loop through worksheets in that array, do an if-then on the sheet name, then do what I need with the sheet. Is there an existing way to simply grab a sheet by name with something like getWorksheet('name')? If not, can that happen in a future API? It would save a lot of time.

                • 5. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                  Ben Lower

                  Ha OK thanks for the heads up!


                  What does 'addressable' mean here? Do you want a collection for each of them (Images collection, Data collection, etc.)? Do you want to be able to read? Write?


                  have you tried using the Voyager project? Just curious.

                  • 6. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                    Ben Lower

                    Sorry for the deficiency on the examples so far!  getSummaryDataAsync() is very similar (as you discovered). Here's the list of options for each:


                    getSummaryDataAsync Options:

                    • maxRows     int
                    • ignoreAliases     bool
                    • ignoreSelection     bool


                    getUnderlyingData Async Options:

                    • (all the options for getSummaryDataAsync)
                    • includeAllColumns     bool


                    We're working on getting the docs finished up.


                    Thanks for the suggestion on the getWorksheet(). I will add that to our backlog for further consideration.



                    • 7. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                      Steve Berndt

                      Ben, can you elaborate on the new REST API methods for working with schedules? Will we be able to trigger a schedule with the API without going the 'undocumented' route?

                      • 8. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                        Ben Lower

                        Hey Steve: We've not had a chance to implement the ability to trigger a schedule via REST API yet. Are you wanting to be able to arbitrarily trigger any schedule manually via REST? How do you envision using this? I'd love to better understand your needs here so we can get it on our backlog.

                        • 9. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                          Tom W

                          I'm not sure if my request is tied to this, but effectively I would like to be able to trigger the 'Refresh Extracts' command via a REST request.

                          We use Tableau online and I have to setup a dedicated server to run on Saturday and Sunday to refresh two extracts we host on the Online server every 5 minutes for two windows of time on Saturday and Sunday. I don't want tabcmd running on existing web server infrastructure, I'd much prefer to be able to make a REST call from our existing webapp on a schedule to achieve the same thigng.

                          • 10. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                            Steve Berndt

                            Thanks for the quick reply Ben. There is a way to do this currently with the command line, but that's not an option for us. I'd basically want to replicate the behavior of entering  "tabcmd refreshextract --project default --datasource MyDataExtract" without having to go through the command line. My goal is to have my server make the API call each time a user visits the portal we built for them. That way, instead of scheduling 50 sites to extract all at once and placing unnecessary strain on our database, I can have users only ask the database for fresh data when they need it. In a lot of ways, that gives you the best of both worlds, performance of running on an extract and process overhead that's akin to being connected live. I see the command being something like "GET /api/api-version/sites/site-id/datasources/datasource-id/refresh". Or perhaps would this need to be a POST request?


                            My hope is that eventually, anything that can be done via the CLI's can be done via the REST API. I know it's a tall order, and you guys have made amazing progress on it, but the extract refresh is really the last big one for us.

                            • 11. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                              Steve Berndt

                              Tom, that's exactly what we are looking for as well. Only difference being that we use Server instead of Online. Using the CLI's is simply not a good option when using a web server.

                              • 12. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                                Damien Lesage



                                We have the same need regarding triggering extract from the REST API.


                                I also don't see how to add an extract to a schedule. Do you plan to implement it for this Tableau version?



                                • 13. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                                  Matthew Miller

                                  Damien (and Steve Berndt, and Tom W): the REST API doesn't support this (yet), but this is possible through the "clientxml" API:




                                  I think Craig Bloodworth has examples of this in his (quite splendid) Project Yupana.

                                  • 14. Re: Tableau 10.0 Beta 2 Includes Major New APIs!
                                    Steve Berndt

                                    I guess where it loses me is if this is something that is already happening with an API, why doesn't Tableau just make it official and support it? Or better yet, why not fold this functionality into the REST api? Ben Lower, are you familiar with this? Does this mean it's actually less work than starting to build a process from scratch?

                                    1 2 Previous Next