1 Reply Latest reply on Dec 6, 2017 5:40 AM by Vishal Jethwa

    How can i publish a text file as data source in server using REST?

    Mickel John

      Hi,

      I am using REST call for text/JSON file uploading.

       

      http://tableau:8134/api/2.6/sites/00f9-c9ef-49ff-8c50-04fb/fileUploads,it gives 201 response, but i cant see the data source on the server.

       

      As per the Reference-Tableau Server REST API doc, after uploading, i used http://tableau:8134/api/2.6/sites/00f9-c9ef-49ff-8c50-04fb/datasources call for publishing.but i am getting below response.

      <?xml version='1.0' encoding='UTF-8'?>

      <tsResponse xmlns="http://tableau.com/api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tableau.com/api http://tableau.com/api/ts-api-2.7.xsd">

          <error code="500000">

              <summary>Internal Server Error</summary>

              <detail>The server encountered an error and cannot complete your request. Contact your server administrator.</detail>

          </error>

      </tsResponse>

       

      For publishing what are headers are required and what is a body ?

       

      Can i use text/json file as the body?or can i attach the file as binary in postman?

       

      Please help me.

       

      Thank you.