Unable to Update Tableau Workbook Connection via API









up vote
0
down vote

favorite












I'm attempting to update workbook connection information via the Tableau REST API, but I'm receiving an error 400 "Missing required XML value." However, the request body I'm ultimately sending



<?xml version="1.0" encoding="UTF-8"?>
<tsRequest>
<connection
embedPassword="True" password="password"
serverAddress="con.company.com" serverPort="5439"
userName="username"
/>
</tsRequest>


seems to match exactly what is described in the API documentation:



<tsRequest>
<connection
serverAddress="server-address" serverPort="port"
userName="connection-username" password="connection-password"
embedPassword="embed-password" />
</tsRequest>


Anyone have an idea what I'm missing here?



Here is the exception raised by the program:




TableauXMLResponseException "TSRequest _requestSiteId = Just (SiteID "the-site-id"), _requestMethod = PUT, _requestPath = "/sites/the-site-id/workbooks/the-workbook-id/connections/the-connection-id", _requestQueryParams = , _requestPayload = Document documentPrologue = Prologue prologueBefore = , prologueDoctype = Nothing, prologueAfter = , documentRoot = Element elementName = Name nameLocalName = "tsRequest", nameNamespace = Nothing, namePrefix = Nothing, elementAttributes = fromList , elementNodes = [NodeElement (Element elementName = Name nameLocalName = "connection", nameNamespace = Nothing, namePrefix = Nothing, elementAttributes = fromList [(Name nameLocalName = "embedPassword", nameNamespace = Nothing, namePrefix = Nothing,"True"),(Name nameLocalName = "password", nameNamespace = Nothing, namePrefix = Nothing,"password"),(Name nameLocalName = "serverAddress", nameNamespace = Nothing, namePrefix = Nothing,"con.company.com"),(Name nameLocalName = "serverPort", nameNamespace = Nothing, namePrefix = Nothing,"5439"),(Name nameLocalName = "userName", nameNamespace = Nothing, namePrefix = Nothing,"username")], elementNodes = )], documentEpilogue = " (Response responseStatus = Status statusCode = 400, statusMessage = "Bad Request", responseVersion = HTTP/1.1, responseHeaders = [("Date","Fri, 09 Nov 2018 22:06:01 GMT"),("Content-Type","application/xml;charset=utf-8"),("Transfer-Encoding","chunked"),("Connection","keep-alive"),("Server","Tableau"),("X-Tableau","Tableau Server"),("X-UA-Compatible","IE=Edge"),("X-Content-Type-Options","nosniff"),("X-XSS-Protection","1; mode=block")], responseBody = "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">Bad RequestThere was a problem updating connection 'the-connection-id' for workbook 'the-workbook-id'.", responseCookieJar = CJ expose = , responseClose' = ResponseClose) (MissingFieldException mfeCallStack = [("missingFieldException",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Required", srcLocFile = "src/Network/Tableau/Required.hs", srcLocStartLine = 49, srcLocStartCol = 27, srcLocEndLine = 49, srcLocEndCol = 48),("required",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Types", srcLocFile = "src/Network/Tableau/Types.hs", srcLocStartLine = 476, srcLocStartCol = 46, srcLocEndLine = 476, srcLocEndCol = 54),("parseTSResponse",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Types", srcLocFile = "src/Network/Tableau/Types.hs", srcLocStartLine = 196, srcLocStartCol = 23, srcLocEndLine = 196, srcLocEndCol = 44),("parseHTTPServerResponse",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Client", srcLocFile = "src/Network/Tableau/Client.hs", srcLocStartLine = 123, srcLocStartCol = 8, srcLocEndLine = 123, srcLocEndCol = 39)], mfeMessage = "Missing required XML value")











share|improve this question





















  • Can you edit your question to include the code used to send the request? And can you try running the request through Postman to see if it works there?
    – Sam M
    Nov 10 at 22:15














up vote
0
down vote

favorite












I'm attempting to update workbook connection information via the Tableau REST API, but I'm receiving an error 400 "Missing required XML value." However, the request body I'm ultimately sending



<?xml version="1.0" encoding="UTF-8"?>
<tsRequest>
<connection
embedPassword="True" password="password"
serverAddress="con.company.com" serverPort="5439"
userName="username"
/>
</tsRequest>


seems to match exactly what is described in the API documentation:



<tsRequest>
<connection
serverAddress="server-address" serverPort="port"
userName="connection-username" password="connection-password"
embedPassword="embed-password" />
</tsRequest>


Anyone have an idea what I'm missing here?



Here is the exception raised by the program:




TableauXMLResponseException "TSRequest _requestSiteId = Just (SiteID "the-site-id"), _requestMethod = PUT, _requestPath = "/sites/the-site-id/workbooks/the-workbook-id/connections/the-connection-id", _requestQueryParams = , _requestPayload = Document documentPrologue = Prologue prologueBefore = , prologueDoctype = Nothing, prologueAfter = , documentRoot = Element elementName = Name nameLocalName = "tsRequest", nameNamespace = Nothing, namePrefix = Nothing, elementAttributes = fromList , elementNodes = [NodeElement (Element elementName = Name nameLocalName = "connection", nameNamespace = Nothing, namePrefix = Nothing, elementAttributes = fromList [(Name nameLocalName = "embedPassword", nameNamespace = Nothing, namePrefix = Nothing,"True"),(Name nameLocalName = "password", nameNamespace = Nothing, namePrefix = Nothing,"password"),(Name nameLocalName = "serverAddress", nameNamespace = Nothing, namePrefix = Nothing,"con.company.com"),(Name nameLocalName = "serverPort", nameNamespace = Nothing, namePrefix = Nothing,"5439"),(Name nameLocalName = "userName", nameNamespace = Nothing, namePrefix = Nothing,"username")], elementNodes = )], documentEpilogue = " (Response responseStatus = Status statusCode = 400, statusMessage = "Bad Request", responseVersion = HTTP/1.1, responseHeaders = [("Date","Fri, 09 Nov 2018 22:06:01 GMT"),("Content-Type","application/xml;charset=utf-8"),("Transfer-Encoding","chunked"),("Connection","keep-alive"),("Server","Tableau"),("X-Tableau","Tableau Server"),("X-UA-Compatible","IE=Edge"),("X-Content-Type-Options","nosniff"),("X-XSS-Protection","1; mode=block")], responseBody = "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">Bad RequestThere was a problem updating connection 'the-connection-id' for workbook 'the-workbook-id'.", responseCookieJar = CJ expose = , responseClose' = ResponseClose) (MissingFieldException mfeCallStack = [("missingFieldException",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Required", srcLocFile = "src/Network/Tableau/Required.hs", srcLocStartLine = 49, srcLocStartCol = 27, srcLocEndLine = 49, srcLocEndCol = 48),("required",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Types", srcLocFile = "src/Network/Tableau/Types.hs", srcLocStartLine = 476, srcLocStartCol = 46, srcLocEndLine = 476, srcLocEndCol = 54),("parseTSResponse",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Types", srcLocFile = "src/Network/Tableau/Types.hs", srcLocStartLine = 196, srcLocStartCol = 23, srcLocEndLine = 196, srcLocEndCol = 44),("parseHTTPServerResponse",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Client", srcLocFile = "src/Network/Tableau/Client.hs", srcLocStartLine = 123, srcLocStartCol = 8, srcLocEndLine = 123, srcLocEndCol = 39)], mfeMessage = "Missing required XML value")











share|improve this question





















  • Can you edit your question to include the code used to send the request? And can you try running the request through Postman to see if it works there?
    – Sam M
    Nov 10 at 22:15












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm attempting to update workbook connection information via the Tableau REST API, but I'm receiving an error 400 "Missing required XML value." However, the request body I'm ultimately sending



<?xml version="1.0" encoding="UTF-8"?>
<tsRequest>
<connection
embedPassword="True" password="password"
serverAddress="con.company.com" serverPort="5439"
userName="username"
/>
</tsRequest>


seems to match exactly what is described in the API documentation:



<tsRequest>
<connection
serverAddress="server-address" serverPort="port"
userName="connection-username" password="connection-password"
embedPassword="embed-password" />
</tsRequest>


Anyone have an idea what I'm missing here?



Here is the exception raised by the program:




TableauXMLResponseException "TSRequest _requestSiteId = Just (SiteID "the-site-id"), _requestMethod = PUT, _requestPath = "/sites/the-site-id/workbooks/the-workbook-id/connections/the-connection-id", _requestQueryParams = , _requestPayload = Document documentPrologue = Prologue prologueBefore = , prologueDoctype = Nothing, prologueAfter = , documentRoot = Element elementName = Name nameLocalName = "tsRequest", nameNamespace = Nothing, namePrefix = Nothing, elementAttributes = fromList , elementNodes = [NodeElement (Element elementName = Name nameLocalName = "connection", nameNamespace = Nothing, namePrefix = Nothing, elementAttributes = fromList [(Name nameLocalName = "embedPassword", nameNamespace = Nothing, namePrefix = Nothing,"True"),(Name nameLocalName = "password", nameNamespace = Nothing, namePrefix = Nothing,"password"),(Name nameLocalName = "serverAddress", nameNamespace = Nothing, namePrefix = Nothing,"con.company.com"),(Name nameLocalName = "serverPort", nameNamespace = Nothing, namePrefix = Nothing,"5439"),(Name nameLocalName = "userName", nameNamespace = Nothing, namePrefix = Nothing,"username")], elementNodes = )], documentEpilogue = " (Response responseStatus = Status statusCode = 400, statusMessage = "Bad Request", responseVersion = HTTP/1.1, responseHeaders = [("Date","Fri, 09 Nov 2018 22:06:01 GMT"),("Content-Type","application/xml;charset=utf-8"),("Transfer-Encoding","chunked"),("Connection","keep-alive"),("Server","Tableau"),("X-Tableau","Tableau Server"),("X-UA-Compatible","IE=Edge"),("X-Content-Type-Options","nosniff"),("X-XSS-Protection","1; mode=block")], responseBody = "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">Bad RequestThere was a problem updating connection 'the-connection-id' for workbook 'the-workbook-id'.", responseCookieJar = CJ expose = , responseClose' = ResponseClose) (MissingFieldException mfeCallStack = [("missingFieldException",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Required", srcLocFile = "src/Network/Tableau/Required.hs", srcLocStartLine = 49, srcLocStartCol = 27, srcLocEndLine = 49, srcLocEndCol = 48),("required",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Types", srcLocFile = "src/Network/Tableau/Types.hs", srcLocStartLine = 476, srcLocStartCol = 46, srcLocEndLine = 476, srcLocEndCol = 54),("parseTSResponse",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Types", srcLocFile = "src/Network/Tableau/Types.hs", srcLocStartLine = 196, srcLocStartCol = 23, srcLocEndLine = 196, srcLocEndCol = 44),("parseHTTPServerResponse",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Client", srcLocFile = "src/Network/Tableau/Client.hs", srcLocStartLine = 123, srcLocStartCol = 8, srcLocEndLine = 123, srcLocEndCol = 39)], mfeMessage = "Missing required XML value")











share|improve this question













I'm attempting to update workbook connection information via the Tableau REST API, but I'm receiving an error 400 "Missing required XML value." However, the request body I'm ultimately sending



<?xml version="1.0" encoding="UTF-8"?>
<tsRequest>
<connection
embedPassword="True" password="password"
serverAddress="con.company.com" serverPort="5439"
userName="username"
/>
</tsRequest>


seems to match exactly what is described in the API documentation:



<tsRequest>
<connection
serverAddress="server-address" serverPort="port"
userName="connection-username" password="connection-password"
embedPassword="embed-password" />
</tsRequest>


Anyone have an idea what I'm missing here?



Here is the exception raised by the program:




TableauXMLResponseException "TSRequest _requestSiteId = Just (SiteID "the-site-id"), _requestMethod = PUT, _requestPath = "/sites/the-site-id/workbooks/the-workbook-id/connections/the-connection-id", _requestQueryParams = , _requestPayload = Document documentPrologue = Prologue prologueBefore = , prologueDoctype = Nothing, prologueAfter = , documentRoot = Element elementName = Name nameLocalName = "tsRequest", nameNamespace = Nothing, namePrefix = Nothing, elementAttributes = fromList , elementNodes = [NodeElement (Element elementName = Name nameLocalName = "connection", nameNamespace = Nothing, namePrefix = Nothing, elementAttributes = fromList [(Name nameLocalName = "embedPassword", nameNamespace = Nothing, namePrefix = Nothing,"True"),(Name nameLocalName = "password", nameNamespace = Nothing, namePrefix = Nothing,"password"),(Name nameLocalName = "serverAddress", nameNamespace = Nothing, namePrefix = Nothing,"con.company.com"),(Name nameLocalName = "serverPort", nameNamespace = Nothing, namePrefix = Nothing,"5439"),(Name nameLocalName = "userName", nameNamespace = Nothing, namePrefix = Nothing,"username")], elementNodes = )], documentEpilogue = " (Response responseStatus = Status statusCode = 400, statusMessage = "Bad Request", responseVersion = HTTP/1.1, responseHeaders = [("Date","Fri, 09 Nov 2018 22:06:01 GMT"),("Content-Type","application/xml;charset=utf-8"),("Transfer-Encoding","chunked"),("Connection","keep-alive"),("Server","Tableau"),("X-Tableau","Tableau Server"),("X-UA-Compatible","IE=Edge"),("X-Content-Type-Options","nosniff"),("X-XSS-Protection","1; mode=block")], responseBody = "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">Bad RequestThere was a problem updating connection 'the-connection-id' for workbook 'the-workbook-id'.", responseCookieJar = CJ expose = , responseClose' = ResponseClose) (MissingFieldException mfeCallStack = [("missingFieldException",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Required", srcLocFile = "src/Network/Tableau/Required.hs", srcLocStartLine = 49, srcLocStartCol = 27, srcLocEndLine = 49, srcLocEndCol = 48),("required",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Types", srcLocFile = "src/Network/Tableau/Types.hs", srcLocStartLine = 476, srcLocStartCol = 46, srcLocEndLine = 476, srcLocEndCol = 54),("parseTSResponse",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Types", srcLocFile = "src/Network/Tableau/Types.hs", srcLocStartLine = 196, srcLocStartCol = 23, srcLocEndLine = 196, srcLocEndCol = 44),("parseHTTPServerResponse",SrcLoc srcLocPackage = "main", srcLocModule = "Network.Tableau.Client", srcLocFile = "src/Network/Tableau/Client.hs", srcLocStartLine = 123, srcLocStartCol = 8, srcLocEndLine = 123, srcLocEndCol = 39)], mfeMessage = "Missing required XML value")








tableau tableau-server






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 20:01









user4601931

1,97111323




1,97111323











  • Can you edit your question to include the code used to send the request? And can you try running the request through Postman to see if it works there?
    – Sam M
    Nov 10 at 22:15
















  • Can you edit your question to include the code used to send the request? And can you try running the request through Postman to see if it works there?
    – Sam M
    Nov 10 at 22:15















Can you edit your question to include the code used to send the request? And can you try running the request through Postman to see if it works there?
– Sam M
Nov 10 at 22:15




Can you edit your question to include the code used to send the request? And can you try running the request through Postman to see if it works there?
– Sam M
Nov 10 at 22:15

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242911%2funable-to-update-tableau-workbook-connection-via-api%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242911%2funable-to-update-tableau-workbook-connection-via-api%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Barbados

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3