1 Reply Latest reply on May 24, 2016 8:44 AM by Diane Economides

    Setting Content Permissions Using Create Project Method in Tableau REST API 2.2

    Diane Economides

      Hi,

       

      I'm just starting to explore the REST API for automating some tasks on Tableau Server.  On the API Reference page it says the Create Project method should allow me to override the default permissions on a project of Managed by Owner by setting the contentPermissions="LockedToProject" in the request body, but this doesn't seem to be working.  I have had to use the Update Project method instead.

       

      Here's what I have in the request body:

       

      <tsRequest>

        <project name="Test Project"

          description="Testing the API"

          contentPermissions="LockedToProject" />

      </tsRequest>

       

      Here's the response body - notice there's no reference to the content permissions:

       

      <?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.3.xsd">

          <project id="dcbedc90-23e7-44db-986d-f317f68481ea" name="Test Project" description="Testing the API" />

      </tsResponse>

       

      When I call the Update Project method, it does work and it's reflected in the response body.

       

      <tsRequest>

        <project name="Test Project"

          description="Testing the API"

          contentPermissions="LockedToProject" />

      </tsRequest>

       

      Response body:

       

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

      <tsResponse xmlns="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.2.xsd">

          <project id="dcbedc90-23e7-44db-986d-f317f68481ea" name="Test Project" description="Testing the API" contentPermissions="LockedToProject" />

      </tsResponse>

       

      I'm using version 9.3.0 of Tableau Server and version 2.2 of the REST API, calling the methods through Postman.

       

      Has anyone else run into this issue?

       

      Thanks,

      Diane