Skip to content

How to get Root Project Folder only #491

Closed

Description

@Barathwaja

Hi All,

I couldn't get only the RootFolder (Projects) present under Sites but its pulling all nested projects.

For example:
https://SERVERURL/#/site/Main/projects/111

Under this there are 5 Projects (ie) Test1, Test2, Test3. Test4, Test5

While using Python TSC, it pulls all Main + 5 Projects not only the Main when using the function server.projects.get().

Is there a way to pull only root projects not sub or nested projects

Activity

  1. dzucker-tab commented on Aug 26, 2019

    @dzucker-tab
    Contributor

    @Barathwaja

    Double checking that this is not a doc bug, but I believe there is not currently a way to do this using TSC.

    You can do it using the REST API directly:

    {{server}}/api/{{version}}/sites/{{site-id}}/projects?filter=topLevelProject:eq:true

    Hope that is of some use for now, and I'll get back to you to confirm about TSC.

  2. majordenny2012 commented on Aug 28, 2019

    @majordenny2012

    I also facing similar issue . I am logging to tableau server using TSC and downloading all the workbooks in local and pushing to git .But not able to generate the parent child relations hope it is not able to identify the RootFolder (Projects) by TSC. Please confirm we can achieve this by TSC.

  3. Barathwaja commented on Sep 2, 2019

    @Barathwaja
    Author

    @dzucker-tab any luck??

  4. dzucker-tab commented on Sep 3, 2019

    @dzucker-tab
    Contributor

    Yes, I can confirm that the topLevelProject attribute hasn't been exposed in TSC yet. Thanks much for calling this out this gap, as you can see @shinchris just pushed a PR to address this and I'll see if I can get it tested and merged this week.

    If you need a quicker fix, the workaround I can think of is to use the response from a REST request in combination with your TSC script.

  5. shinchris commented on Sep 3, 2019

    @shinchris
    Contributor

    This has been fixed with PR #497 in our 'development' branch.

    req_option = TSC.RequestOptions()
    req_option.filter.add(TSC.Filter(TSC.RequestOptions.Field.TopLevelProject, TSC.RequestOptions.Operator.Equals, True))
    
    all_projects, pagination_item = server.projects.get(req_option)
    
  6. Barathwaja commented on Sep 4, 2019

    @Barathwaja
    Author

    @dzucker-tab Cool thanks !!

    @shinchris Thanks :) , and any ETA when this will be added to new release?

  7. majordenny2012 commented on Sep 9, 2019

    @majordenny2012

    @shinchris Thanks a lot .Any ETA when this will be added to the new releases ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions