Giter VIP home page Giter VIP logo

rest-api-samples's Introduction

rest-api-samples

Tableau Supported

This repository contains Python and Java samples for the Tableau REST API, as well as Postman collections that can be called against the REST API. For instructions on running the samples, see the Readme files in each directory.

Other references

Getting Started

  • Clone this repository.
  • Select the version of the REST API that you want to use. The API version corresponds to the version of Tableau Server that you use. For more information, see API Versions in the documentation. You will have to configure the samples to use the API version that you select.
  • Try the samples against your Tableau Server or Tableau Online.
  • Use 'Issues' to note any bugs or to request new samples.
  • Let us know if you have samples of your own you'd like to share.

Note: the Java samples are written for Java 8, and will not run against Java 11 or Java 13. We do plan to update them, but if you send a PR that would also be welome!

rest-api-samples's People

Contributors

aaroncarey avatar benlower avatar carelessproperty avatar d45 avatar delphinium avatar dzucker-tab avatar jacalata avatar jdomingu avatar leeguoping avatar mbren avatar rojoleon avatar shinchris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rest-api-samples's Issues

Can not activate 'queryTaggingEnabled' to true for a bigquery datasource

Hello,

I have a Tableau Server 2022.1.3 (API v 3.15).
Using REST API, I have successfully activated the 'queryTaggingEnabled' property to true for a published datasource linked to a MS SQL Server.

I wanted to do the same for a published datasource linked to a big query dataset.
The 'queryTaggingEnabled' property remains to false.

I am stuck, and my goal is to investigate on big query to limit costs.

Waiting for help

Thank you

Ivan

How do I build my application and run it like a server?

I have downloaded the source code and build application by JAVA, Whenever I clean by ANT it cleans the lib folder and ant compile and run doesn't work for me.

Can you please provide the full step to build it and put the request and response for the same?
Thanks.

Spring MVC version

Hi Team,

I'm not able to Autowire any class into RestAPIUtils class. Even if I do, it will be null and throws nullPointerException. Can someone help to fix this issue?

Thanks ,
Suhas Bhat

API Version is whining

main.ApiCallError: 404001: Resource Not Found - Version '2.5' is not a valid version of the API.
I am using the provided version.py and it doesn't like it.

Java: Worbook Sample Upload: Fails by com.sun.jersey.api.client.ClientHandlerException

Hi everyone,

the Workbookupload fails: I use the unmodified code. Do you have an advice for me?
API Version is 3.12.

Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.sun.jersey.multipart.MultiPart, and MIME media type, multipart/mixed;boundary=Boundary_1_1389432760_1636705591685, was not found
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:539)
at com.tableausoftware.documentation.api.rest.util.RestApiUtils.putMultipart(RestApiUtils.java:994)
at com.tableausoftware.documentation.api.rest.util.RestApiUtils.invokeAppendFileUpload(RestApiUtils.java:621)
at com.tableausoftware.documentation.api.rest.util.RestApiUtils.invokePublishWorkbookChunked(RestApiUtils.java:692)
at com.tableausoftware.documentation.api.rest.util.RestApiUtils.invokePublishWorkbook(RestApiUtils.java:284)
at com.tableausoftware.documentation.api.rest.Test.main(Test.java:96)
Caused by: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.sun.jersey.multipart.MultiPart, and MIME media type, multipart/mixed;boundary=Boundary_1_1389432760_1636705591685, was not found
at com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:288)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:217)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)
... 9 more

Regards,
Fabian

"Move workbooks" sample doesn't work for large workbooks

Hi team,

I spotted an issue in this sample script:
https://github.com/tableau/rest-api-samples/blob/master/python/move_workbook_sites.py

When running it with a large workbook (over 64MB) the script fails with:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 405, in
main()
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 392, in main
workbook_content, dest_project_id)
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 299, in publish_workbook
upload_id = start_upload_session(server, site_id, auth_token)
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 173, in start_upload_session
_check_status(server_response, 201)
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 106, in _check_status
raise ApiCallError(error_message)
main.ApiCallError: 401002: Unauthorized Access - Invalid authentication credentials were provided.

I found this happens because of line 288:
upload_id = start_upload_session(server, site_id, auth_token)

the code should be:
upload_id = start_upload_session(server, auth_token, site_id)

Otherwise it uses "site id" as auth token and fails... Could you please fix?
NB: Same issue could be affecting other samples...

deleteExtract function is not working

Hello
I was trying to use deleteExtract function to delete extract from workbooks located on the server.
When I was trying to launch it was constantly sending 500 Internal Server error.

I checked source code of the function as well as rest API documentation for this http request, and found out that XML body is not correct in library for this function. It does not include "includeall = TRUE" parameter in it.

So I modified source code of the function to have this:
def delete_extract(self, workbook_item):
id_ = getattr(workbook_item, "id", workbook_item)
url = "{0}/{1}/deleteExtract".format(self.baseurl, id_)
includeAll = True
datasources = None
datasource_req = RequestFactory.Workbook.embedded_extract_req(includeAll, datasources)
#empty_req = RequestFactory.Empty.empty_req()
server_response = self.post_request(url, datasource_req)

So after modifying this code, I was able to launch the functions successfully.

But
It was completed without an error only for 30% of workbooks, for most of them it thrown an error:
409080: Bad Request There was a problem deleting extract for workbook 'bf4ae00f-6570-4867-800c-625965e3731b'.

Not able to upload tableau workbook, Jasper exception

Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.sun.jersey.multipart.MultiPart, and MIME media type, multipart/mixed; boundary=Boundary_1_2005733474_1647514039155, was not found

at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)

at com.sun.jersey.api.client.Client.handle(Client.java:652)

at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)

at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)

at

Workbook Connection String

Would kill for an additional script to view/modify serverAddress from workbook/connection/connections

How can we Query Workbook for a given filter

Hello,

Is there a way to download all the views (as png or pdf) for a given workbook, filtered by a given dimension value?

For instance: If the workbook has a filter on dimension device type (values = smartphone, desktop and tablet), then query this workbook for a given dimension (say smartphone) and download the png. ?

Thanks
Sid

Unable to import 'version' package 'izip_longest' Python3+

When installing one of the dependency packages 'version' from the user sample 'move_workbook_server.py'. Receive the following error:

  Downloading https://files.pythonhosted.org/packages/fd/b6/fa3b2c859d4d8817a106e4272029d78a2afbca0a27139997a4e5515bbf60/version-0.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\J19277\AppData\Local\Temp\pip-install-vhh6yntg\version\setup.py", line 4, in <module>
        from version import __version__
      File "C:\Users\J19277\AppData\Local\Temp\pip-install-vhh6yntg\version\version.py", line 2, in <module>
        from itertools import izip_longest
    ImportError: cannot import name 'izip_longest' from 'itertools' (unknown location)

Developer has pushed a commit below to 0.1.2 however this isn't deployed on PyPI keleshev/version@d4b32b6

Consistent 400000 error when using this to publish a TDE

@jdomingu

Is this script compatible with v2.4 API?

I wanted to modify this script to publish a TDE. My TDE's are very small (<1MB) so the all-in-one method should be appropriate.

I'm using tableau online 10.1, so have changed the global API version var to '2.4'.

I've modified the metadata XML block as follows

pjID = my project ID
lxmlbody = ET.Element('tsRequest')
datasource_element = ET.SubElement(xmlbody, 'datasource', name='hires.tde')
ET.SubElement(datasource_element,'project_id',id=pjID)
xmlbody = ET.tostring(xmlbody)

I've set the server as follows:

publish_url = server + '/api/2.4/sites/{0}/datasources?overwrite=true'.format(site_id)

and here's the block that builds the body itself

parts = {'request_payload': ('', xmlbody, 'text/xml'),
                'tableau_datasource': (tde_file, tde_bytes, 'application/octet-stream')}
    payload, content_type = _make_multipart(parts)

And i'm consistently getting this back

main.ApiCallError, 400000: Bad Request - Payload is either malformed XML or incomplete

Creating Auto Trigger alerts of Tableau extract refreshes using the REST API

Hi All,
For now, I know the below process using the POSTMAN application –
<>Token sign in to Tableau Online using Postman and save the credentials
<>Fetch out Workbook Name (A) / Workbook ID
<> Run the Extract corresponding to the Workbook Name(A)
<> Get the status of that Extract whether it's failed or successful.

How would I can combine all the above 4 points in one Python code to get the respective output for a workbook ? Can you help in demonstrating the stepwise procedure, please?

TWB not allowed as a workbook type to Publish?

Hello

I am trying to utilize python to edit and publish TWB based workbooks. The current example publish_workbook.py is great, but only TWBX based files. I know I can publish TWB files through tabcmd and a workbook type can even be distinguished on your API documentation online:
https://onlinehelp.tableau.com/current/api/rest_api/en-us/help.htm#REST/rest_api_ref.htm#Publish_Workbook%3FTocPath%3DAPI%2520Reference%7C_____45

Could you please upload an updated publish_workbook.py example that allows TWB based workbooks? If the API allows it, it should work. I'm not the best with XML, any help would be great.

Thank you

No java API to upload or update data sources

The java sample api supports upload of workbooks but has no support to create or update data sources. According to the rest api documentation this is supported, but obscure Tableau server response problems block developers from integrating data. Can you add working java client API and sample for uploading hyper formatted data sources?

need help w/requests install

Hi - after installing Python 3.9 on my windows machine I'm trying to install the requests module.

When I issue the install command (python -m pip install requests) nothing happens.

I'm new to python so if anyone could help with this it would be very much appreciated.

Thanks.

Samples with Json

it looks like Tableau till API versions 2.4 supported XML and hence why the samples use JAXB. But now that the current version (2.5) does support JSON as well, is there any chance to update the samples?

'ant run' failed for java sample code - requires JAXB 2.2

Hi,

When running the Java sample 'ant run', it throws an exception telling it is loading JAXB 2.1, but requires JAXB 2.2.


C:\>java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

C:\>ant -version
Apache Ant(TM) version 1.10.5 compiled on July 10 2018

image

Not able to use impersonation in Tableau Cloud using REST API

User impersonation in tableu Cloud using REST API (issue):
on cloud: when I am trying to impersonate a user through Site Administrator Creator role its showing error :

Code :
import tableauserverclient as TSC
tableau_auth = TSC.TableauAuth(cloud_cred['username'], cloud_cred['password'], site_id='site',user_id_to_impersonate='user_id')
server = TSC.Server(cloud_cred['url'], use_server_version=True)
server.auth.sign_in(tableau_auth)
Error :
Signin Error
User ' Site Administrator Creator ' is not a system admin and may not impersonate as another user.

Versions:
• Tableau version – 3.15
• Python version -3.9.12

https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_authentication.htm

Can only run samples with JDK 8 (not 11/13)

after following the pre-requisites which just point to a general JDK page, i had lots of errors that only cleared up after I went from jdk 13, to 11, then to 8. It only worked on 8. I think I read somewhere that jaxb left the jdk in version 9? Can we delcare which versions will work or fix the samples to function with the latest jdks?

Issue with max_page logic in all the samples and functions

max_page = int(math.ceil(total_projects / page_size))

The above statement will not work wherever it has been used in the samples because it will return one less page than the actual number of pages

For example if total projects are 223 and page size is 100 then max_page will be 2. I see that this similar logic has been applied to a number of sample codes. There are multiple fixes possible. The simplest would be to just multiply it by 1.0.

max_page = int(math.ceil(total_projects * 1.0/ page_size))

Logon API, jQuery sample method?

I tried the below, dataLogon is in JSON format (s/be valid since I can log on the web page)

$.ajax({
type: 'POST',
url: 'http://siteurl/api/2.7/auth/signin',
dataType: 'jsonp',
contentType: 'application/json; charset=UTF-8',
data: dataLogon,
success : handleData
});

got the error like:

GET http://siteurl/api/2.7/auth/signin?callback=jQuery180008327724081323051_1506605692097&{%22credentials%22:%20{%22name%22:%20%22_name_%22,%22password%22:%20%22_passwd_%22,%22site%22:%20{%22contentUrl%22:%22Demo%22}}}&_=1506605701445 net::ERR_ABORTED

How to create user id over 100 number with using REST API in Tableau Server

Hi

I am going to create user id over 8000 number with using REST API in Tableau Server

I wrote below code in Demo.java

UserType tmpuser = null ;
for(int iii=0 ; iii < 1000; iii++)
    tmpuser = s_restApiUtils.invokeCreateUser(credential, currentSiteId, "CreateUserInTableauExampleII" + Integer.toString(iii));

and I wrote below code in RestApiUtils.java

private enum Operation {
 ...
    CREATE_USER(getApiUriBuilder().path("sites/{siteId}/users"));

public UserType invokeCreateUser(TableauCredentialsType credential, String sitedId, String userName) {
    String url = Operation.CREATE_USER.getUrl(sitedId);
    TsRequest payload = createPayloadForCreatingUser(userName);
    TsResponse response = post(url, creditial.getToken(), payload);
    if (response.getUser() != null {
        return response.getUser();
    }
    return null;
}

I wrote adding this code "User.setSiteRole(SiteRoleType.fromValue("viewer"));" in CreatePayloadForCreatingUser() function.

I received a normal reply from Tableau server.
but when I called invokeQueryUsers function, I didn't see user id  that I had created from the reply.

Why can't I create more than 100 user IDs?

What is the SERVER_URL?

This might be stupid question, but I was trying out sample tableau sign in with the following code

import tableauserverclient as TSC

tableau_auth = TSC.TableauAuth('USERNAME', 'PASSWORD')
server = TSC.Server('http://SERVER_URL')

I wonder what is the SERVER_URL mean here? I have tableau online, not the tableau sever

Need to read the published url from the tableau server

Hi ,
I have a requirement where from tableau client we have published one report to some server lets say Teradata or google cloud,
now I want to read the report which has been published and load to spark, so it is possible to like from your code can I read the published report URL using java?

thanks in advance?

'ant run' failed for java sample code

Hi, I have followed the steps specified in README and successfully built the project, however when it comes to last step 'ant run,' it gives me this following error:

Error: Could not find or load main class "com.tableausoftware.documentation.api.rest.Demo"

Here is the screenshot. It could be awesome if you can help me find out what's wrong.

screenshot

.twb that uses live connections

In the python publishing workbook script, it says:

Note: The REST API publish process cannot automatically include
extracts or other resources that the workbook uses. Therefore,
a .twb file with data from a local computer cannot be published.
For simplicity, this sample will only accept a .twbx file to publish.

What happens if the .twb uses only live connections and there is no associated local data source? Shouldnt the code factor this in and give the ability to upload these type of .twb workbooks to Tableau Server?

Can't even login to the latest version

I just installed the latest version of Tableau server and I can't even login. It looks like they changed the API and it no longer works. Do I have to pay extra or something for a working version?

b'{"timestamp":[redacted],"status":401,"error":"Unauthorized","message":"Please log in at /login in order to proceed.","path":"/api/2,3/auth/signin"}'

tsm version Tableau Services Manager command line version 20201.0.0.0. Tableau Server version 20201.20.0220.1252.

Python - SSL Certificate Error

Hello tableau community,

I am trying to run the python code for the tableau rest api (specifically the User_Permission_Audit.py). However, I am encountering an SSL error. I believe I am supposed to add "no-certcheck" or set "verify=False" or something like that... but I am not quite sure. Do I incorporate something into the python code or into the terminal script?

Please advise,
Victoria

ssl error

Error when executing @ Step 1

Hello

I am receiving a parsing error from the xml.etree.ElementTree library when executing the move_workbook_sites.py script.

Stating:
moveworkbooktosite

Am I not passing the right variable possibly or is the library for ET that is access the wrong schema in relation to the API. I am using Tableau Server 10.1, the API has been adjusted to 2.4.

Any help would be great, this a great script.

Thank you

jaxbMarshaller.marshal(requestPayload, writer) throwing NullPointerException

I have backend code in my application that needs the retrieved tableau view image passed to it like in the example below:
`String tableauReportBase64Encoded = getStaticImage(tableauReportService.getTableauStaticReport(tableauConstants.getReportImagePath()));
map.put("image1", tableauReportBase64Encoded);

private String getStaticImage(byte[] imageBytes) {
String base64Encoded = null;

	if(imageBytes == null) {
		return null;
	}
	
	byte[] encodeBase64 = Base64.encodeBase64(imageBytes);
	
	try {
		base64Encoded = new String(encodeBase64, "UTF-8");
	} catch (UnsupportedEncodingException e) {
		e.printStackTrace();
	}
	return base64Encoded;
}`

I decided to try this way:
`public byte[] getTableauStaticReport(String reportUrl) {
TableauCredentialsType tableauCredentials = invokeSignIn(Constants.EMPTY_STRING);

	HttpGet getTableauReportImage = new HttpGet(reportUrl);
	getTableauReportImage.addHeader(TableauConstants.TABLEAU_AUTH_HEADER, tableauCredentials.getToken());
	byte[] tableauReportImageBytes = null;
	
	try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
		CloseableHttpResponse response = httpClient.execute(getTableauReportImage);
		InputStream imageInput = response.getEntity().getContent();
		tableauReportImageBytes = new byte[imageInput.available()];
		imageInput.read(tableauReportImageBytes);
	} catch (IOException e) {
		e.printStackTrace();
	}
	
	invokeSignOut(tableauCredentials);
	return tableauReportImageBytes;
}`

But I'm getting a NullPointerException on the jaxbMarshaller.marshal(requestPayload, writer) line of the below code that is used to sign in/make post requests to Tableau:
`private TsResponse post(String url, String authToken, TsRequest requestPayload) {
// Creates an instance of StringWriter to hold the XML for the request
StringWriter writer = new StringWriter();

    // Marshals the TsRequest object into XML format if it is not null
    if (requestPayload != null) {
        try {
            jaxbMarshaller.marshal(requestPayload, writer);
        } catch (JAXBException ex) {
            logger.error("There was a problem marshalling the payload");
        }
    }

    // Converts the XML into a string
    String payload = writer.toString();
    logger.debug("Input payload: \n" + payload);

    HttpPost post = new HttpPost(url);
	List<NameValuePair> urlParameters = new ArrayList<>();
	urlParameters.add(new BasicNameValuePair(TableauConstants.TABLEAU_AUTH_HEADER, authToken));
	String responseXML = "";
	StringEntity payloadEntity = new StringEntity(payload, ContentType.TEXT_XML);

    try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
    	CloseableHttpResponse response = httpClient.execute(post);
    	
    	// Parses the response from the server into an XML string
    	HttpEntity responseEntity = response.getEntity();
		responseXML = responseEntity.toString();

		logger.debug("Response: \n" + responseXML);
    } catch (UnsupportedEncodingException encodingException) {
		encodingException.printStackTrace();
	} catch (IOException e) {
		e.printStackTrace();
	}

    // Returns the unmarshalled XML response
    return unmarshalledResponse(responseXML);
}`

I checked the requestPayload, the name and password are set properly while site, token & user are null, and the writer object has the buf & lock set but the writeBuffer is null. I have not used jaxbMarshaller/StringWriter before but it seems like the marshaller needs the writer to be writing it to a StringBuilder or other object; or is it failing via NullPointerException for another reason?

I do have another question as well: I've tried all of the tableau api get view image calls in Postman and they all work except one that is giving me a 400074 error code. I checked the Tableau site and a 400074 error is a generic query error. Would you know how to troubleshoot that and should I create a separate question/issue for that/the question below?

It seems like that view requires a tableau user to connect to the data source before being able to see the view and that is probably causing the 400074 error. Is there a way to provide those credentials in the view image request?

Can we test the REST samples somehow?

When these were included in the java build system they got run as part of the test suite.

Now that they're in github we need some way to make sure samples don't get broken by changes to the libraries, or changes to the samples themselves.

Ideas:

  1. Manually -- there's some sort of script that runs these all against a configurable server
    • I've been doing this sort of, just without a script, I might be able to whip up a tasks.py or similar
  2. CI system -- build our own mocks of the endpoints somehow
  3. Is there an external service that we can use to mock endpoints?

Java code only work with ts-api_2_3.xsd

I have 10.1 server installed and tried to use 'ts-api_2_4.xsd' but it did not work. I think the issue is... the code will not create a proper payload or it will unmarshall the response correctly. It was giving..

"ERROR tableaurestapi.util.RestApiUtils - There was a problem marshalling the payload"

I have not tried against ts-api_2_5.xsd though.

Python Pip Command Issue

Hi ,

I am getting below error while running a simple tableau server sign in api .
ModuleNotFoundError:No module named request.

I tried to install request library using pip command but no luck
Error:Could not find a version that satisfies the requirement request.

I think my system wont allow me to install any libraries without having admin access.
So i would like to know is there any other way we can download that request library and use it in our code without doing any installation.

Any help is greatly appreciated.

Thanks,
Anita

Tableau Webhook - Unable to connect to URL-408 Error in Response Body

Hi Team,

I have set up Tableau Webhook that sends a JSON payload to webhook.site. Setting up of the webhook is successful. However, when attempted to Test the webhook, it gives the following response of unable to connect to the url "https://xxxx" with status 408 in the Responde Body.

From the webhook logs we see this:
webhooks: INFO com.tableau.extensibility.webhooks.responder.http.HttpPostHookUtil - Sending message to https://some-internal-service/:
webhooks: INFO com.tableau.extensibility.webhooks.responder.http.HttpPostHookSender - IOException on posting

We have Tableau Server 2020.3.3 and server machines are behind PROXY. The server machines do have access to webhook.site. What we have observed is that, when we Test the webhook from Postman it runs for 5 seconds and immediately after that. we get the response as mentioned (408-Unable to reach the URL).
Could this be a time out issue from tableau side as we see the standard connect timeout default settings as 5 seconds and read timeout as 3 seconds?
The certificates aren't Self Signed either.

webhooks.user_agent: TableauWebhooks/1.0
webhooks.http.timeout.connect: 5000
webhooks.http.timeout.read: 3000

The issue is happening with all the endpoints . Azure, GCP as well as webhook.site.

New to these APIs cannot run because of missing VERSION package

Hi --
New to Python, been programming in other languages for years...
I am trying to run the Python script to move workbooks. I have Python 3.10, but I am getting a message about VERSION not being defined (see below).
I tried doing a Pip install VERSION but that did not work.

Any ideas on how I can fix this?
Thanks
John

  1. Signing in to both sites to obtain authentication tokens
    Traceback (most recent call last):
    File "D:\TOL - Scripts\Data Sources\move_datasource_server.py", line 415, in
    main()
    File "D:\TOL - Scripts\Data Sources\move_datasource_server.py", line 382, in main
    source_auth_token, source_site_id, source_user_id = sign_in(source_server, source_username, source_password, source_site)
    File "D:\TOL - Scripts\Data Sources\move_datasource_server.py", line 138, in sign_in
    url = server + "/api/{0}/auth/signin".format(VERSION)
    NameError: name 'VERSION' is not defined

Allow adding incremental refresh schedules via the REST API

https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#add_data_source_to_schedule

I've checked both TSC and the REST API and there doesn't seem to be a way to add incremental refresh schedules programatically. I can only add full refresh schedules to datasources/workbooks.

I'm able to add incremental schedules manually and automate task refresh runs via TSC's Tasks API, but getting the schedule added to begin with is a challenge.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.