public Url_InitiateFileUpload ( TableauServerSignIn, logInInfo ) : string | ||
logInInfo | TableauServerSignIn, | |
Результат | string |
/// <summary> /// Get an upload sessiosn Id /// </summary> /// <returns></returns> private string RequestUploadSessionId() { var urlInitiateFileUpload = _onlineUrls.Url_InitiateFileUpload(_onlineSession); var webRequest = this.CreateLoggedInWebRequest(urlInitiateFileUpload, "POST"); //NOTE: This command requires a POST not a GET var xmlDoc = GetWebReponseLogErrors_AsXmlDoc(webRequest, "get datasources list"); //Get all the workbook nodes var nsManager = XmlHelper.CreateTableauXmlNamespaceManager("iwsOnline"); var uploadInfo = xmlDoc.SelectSingleNode("//iwsOnline:fileUpload", nsManager); var sessionId = uploadInfo.Attributes["uploadSessionId"].Value; AppDiagnostics.Assert(!string.IsNullOrWhiteSpace(sessionId), "Empty upload session id?"); return(sessionId); }