Rally1

Expand all | Collapse all

Get projects under top node

Jump to Best Answer
  • 1.  Get projects under top node

    Posted 11-01-2019 03:31 PM
    Hi Team,

    I want to get all the projects under specified workspace and specified project.

    I have below query which is working fine for workspace scope but not project. Is there any other way to achieve this.

    https://rally1.rallydev.com/slm/webservice/v2.0/project?workspace=/workspace/<WORKSPACEID>&fetch=true&start=1&pagesize=20&project=/project/<TOP-NODE-PROJECTID



    ------------------------------
    BALAJI
    ------------------------------


  • 2.  RE: Get projects under top node

    Posted 11-01-2019 03:34 PM
    Hi Balaji

    If you mean you're wanting to pull all projects that don't have a parent then this query will work:
    https://rally1.rallydev.com/slm/webservice/v2.0/project?query=(Parent.ObjectID%20=%20null)



  • 3.  RE: Get projects under top node

    Posted 11-01-2019 05:05 PM
    Hi DavidLeDeaux,

    Thanks for your quick reply, I will rephrase the question.

    Suppose if I have projects p11,p12,p13 under p1 and p1,p2,p3 under p(root project) and q is another project in workspace.  I need only p11,p12,p13 and p1 (all are under p) not q.



  • 4.  RE: Get projects under top node

    Posted 28 days ago
    Hi @David LeDeaux any idea.​


  • 5.  RE: Get projects under top node

    Posted 28 days ago

    Hi Balaji,

    You'll want to get the ObjectID of the parent project and use a URL like this:

    https://rally1.rallydev.com/slm/webservice/v2.0/project/<ObjectID>/children




  • 6.  RE: Get projects under top node

    Posted 28 days ago
    Hi @David LeDeaux, It is giving only the immediate children not all hierarchical i.e lower level nodes.

    I want all those.



  • 7.  RE: Get projects under top node
    Best Answer

    Posted 28 days ago
    Hi Balaji,

    The data held in the tables are connected by the reference to the a single level up or down (children or parent only). This means that you need to recreate the complete hierarchy in code and cannot do it with a single command.

    I wrote a little bit of code to do this, but it might not be suitable for you as I used d3 (d3js.org) javascript library. If you are interested in the general technique, you can go here and have a look: https://github.com/nikantonelli/WorkspaceEquivalence/blob/89040de11beafd2815e9f8b438953d5cba1f8aaf/App.js#L49

    ------------------------------
    Nik
    Rally Sales Engineer
    Rally Software
    ------------------------------