3 Replies Latest reply on Aug 25, 2015 5:54 AM by Blake Anderton

    rest api 2.0 Are SiteAdmins allowed to manage siteusers?

    Advait Kothare

      Site Admins are allowed to manage users on the site that they are administrators for, from the Tableau Server UI.

      But the REST API doesn't seem to be able to do that and I keep getting an error response.

      Am i missing something? Why would there be 2 different types of authorizations, i.e. 1 for Web UI and another for REST API?

       

      $curl -k 'https://tableauhost/api/2.0/sites/[siteidauth]?includeUsage=true' -X GET -H "X-Tableau-Auth:[authtoken]"

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

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

        <error code="403000">

          <summary>Forbidden</summary>

          <detail>Only system administrators can create, update or query sites.</detail>

        </error>

      </tsResponse>

       

      $curl -v -k 'https://tableauhost/api/2.0/sites/[siteidauth]/users' -X GET -H "X-Tableau-Auth:[authtoken]"

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

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

        <error code="403000">

          <summary>Forbidden</summary>

          <detail>Only system administrators can add users to sites, query sites for user membership, or remove users from sites.</detail>

        </error>

      </tsResponse>