---
schema_version: "1"
id: bda5029606b6d4708f2cb867ce1a776496c6f36736f69c520908be5bf0c40ee3
title: Testing-Tableau Server REST API
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/api/rest_api/REST/rest_api_concepts_testing.md
canonical_url: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_testing.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 2159d28bc15a7189c02922da96b0f8961ba1260e4f9f7f50a0198766de7660a8
description: Usually, you make REST API calls to Tableau Server by writing a program in Python, Ruby, Java, C#, or other programming language that supports HTTP requests
---
[Skip to main content](#main-content)

# Testing and Troubleshooting REST API Calls

Usually, you make REST API calls to Tableau Server by writing a program in Python, Ruby, Java, C#, or other programming language that supports HTTP requests. However, if you just want to experiment with API calls, you can quickly make REST calls using various tools that let you set the HTTP header and body values, issue a request, and then see the results.

## Using command-line utilities to test

Another option for testing REST API calls is to make requests using a tool like [cURL](http://curl.haxx.se/docs/manpage.html) or [Wget](http://www.gnu.org/software/wget/). The following example shows a cURL command that signs in to the server. The command requires you to pass XML information in the body of the request. An easy way to pass XML is to create it in a text file and then reference the text file in the cURL command by using the \-d option. You can specify the HTTP verb (GET, POST, PUT, DELETE, etc.) by using the \-X option.

`curl https://MY-SERVER/api/3.29/auth/signin -X POST -d @signin.xml`

The following is the content of the sigin.xml file that's referenced by the \-d option:

```
<tsRequest>
  <credentials name="admin" password="Passw0rd" >
    <site contentUrl="MarketingSite" />
  </credentials>
</tsRequest>
```

The return values for requests that you issue at the command line are displayed on the command line. If you want to capture the output, you can typically redirect the command to a file, as in the following example:

`curl https://MY-SERVER/api/3.29/auth/signin -X POST -d @signin.xml > restapi-output.txt`

Most Tableau Server REST API requests require a header named X-Tableau-Auth that includes the authentication token that’s returned by a call to the [Sign In](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#sign_in) method. Command-line utilities typically let you set header values for the request. The following example shows a cURL command that gets a list of users from a site. The command includes a value for the X-Tableau-Auth header, which you pass using the \-H option.

`curl http://MY-SERVER/api/3.29/sites/9a8b7c6d5-e4f3-a2b1-c0d9-e8f7a6b5c4d/users/ -H "X-Tableau-Auth:12ab34cd56ef78ab90cd12ef34ab56cd"`

## Using browser-based options to test

You can also test REST calls by using add-ins or extensions in your browser. Some popular apps for testing REST APIs in Google Chrome are [Postman](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm), [Advanced REST client](https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo), and [Rest Web Service Client](https://chrome.google.com/webstore/detail/rest-web-service-client/ecjfcmddigpdlehfhdnnnhfgihkmejin). For Mozilla Firefox there are [REST Client](http://restclient.net/) and [REST Easy](https://addons.mozilla.org/en-US/firefox/addon/rest-easy/). (Check the app store for your browser to find testing tools.)

**Important**: Some websites, such as hackst.com and apigee.com, allow you to issue REST API requests for testing. These will work for your Tableau Server testing only if your server is accessible publicly. If you do use a website to test REST APIs, be aware that you are posting potentially sensitive information to a public site.

Browser-based REST clients typically let you use a form to enter a URI, XML for the body, and header values. When you send the request, the results are displayed in a pane in the browser. The following illustration shows a session of a browser-based REST tool where a user has made a request using the [Sign In](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#sign_in) method and has gotten a response from the server.

![](/tableau/current/en-us/api/rest_api/en-us/Img/rest-api-concepts-test-browser.png)

## Using desktop options to test

You can also test REST API methods using desktop applications. One choice is [RESTClient](https://github.com/wiztools/rest-client), which is written in Java and works on multiple platforms.

## Troubleshooting

If REST API calls are not working the way you expect, you can troubleshoot them several ways.

### Examine error codes

If an error occurs during a request, the response includes both an HTTP status code (like 400, 403, or 404) and an `<error>` element in the response body. The `<error>` tag includes an error code that provides detailed information about the error. For information about errors, see [Handling Errors in the REST API](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_errors.htm) . The documentation for individual methods in the API lists the error codes that a method might return.

### Examine requests and responses

It can be particularly helpful for troubleshooting to examine the raw requests that go between your client and the server. By examining the contents of each request (the HTTP verb and URI, the headers, and the request and response bodies) and comparing those to the documentation, you can often determine why a REST method is not working as it should.

For Windows, you can use [Fiddler](http://www.telerik.com/fiddler), which is a web proxy tool that lets you examine and edit web requests. A similar tool is [Charles HTTP proxy](http://www.charlesproxy.com/), which works on Windows, OS X, and Linux. Other tools include:

- [mitmproxy](http://mitmproxy.org/), a tool for OS X, Linux, and OpenBSD.
- The browser extensions mentioned under [Using browser-based options to test](#testing_using_browser-options) earlier in the topic. You can use extensions in Chrome and Firefox to examine requests that you make using tools like Postman and Advanced REST client.
- [Wireshark](https://www.wireshark.org/), a protocol analyzer that provides very detailed information about network traffic, including HTTP.

### Examine log files

Requests that you make to Tableau Server using the REST API result in log file entries on the server. You can examine the following log files to help troubleshoot REST API issues:

- log-file-location\\httpd\\access.date-time-stamp.log (for example, `access.2015_05_11_00_00_00.log`).
- log-file-location\\logs\\vizportal\\vizportal-process-number.log (for example `vizportal-0.log`)

For information about how to generate a snapshot of log files, see [Archive Log Files](https://help.tableau.com/current/server/en-us/help.htm#logs_create.htm). To learn more about log file locations, see [Server Log File Locations](https://help.tableau.com/current/server/en-us/logs_loc.htm).