Rally Software

 View Only
  • 1.  Get All portfolios for specific project and type is portfolio

    Posted Jun 11, 2018 02:31 AM

    Hi All,


    I tried to get all portfolio specific to project as below but I can't filter only portfolio. I get features and Strategy.




    I tried to filter using the two fields

    1) PortfolioItemTypeName = Portfolio

    2) _type = "PortfolioItem/Portfolio"


    Please help me to get only PortfolioItem/Portfolio. I don't need "PortfolioItem/Feature" or "PortfolioItem/Strategy"

  • 2.  Re: Get All portfolios for specific project and type is portfolio

    Posted Jun 11, 2018 03:02 AM



    You'll need to update your query to use "portfolioitem/portfolio" and query for the Project either by Name or by ObjectID.


    You'll need to replace the "12345" with your project Object ID in this query:


    https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/portfolio?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/25364773881&query=(project = project/12345)




    https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/portfolio?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/25364773881&query=(project.name = "The Project Name")


    You can always use the interactive Web Services API documentation to create and test your queries and see which Artifacts are available and other information.  It is available here: https://rally1.rallydev.com/slm/doc/webservice/ 


    Hope that helps.



  • 3.  Re: Get All portfolios for specific project and type is portfolio

    Posted Jun 11, 2018 06:13 AM

    Once I pass the project id, does this get all the portfolios of the sub projects as well?

    When I tried the above two suggestion I am getting error for project and project.name. Tried with single quote as well no luck.

    Could not parse: Cannot parse expression "project=project/38840425881" as a query

  • 4.  Re: Get All portfolios for specific project and type is portfolio

    Posted Jun 11, 2018 07:13 AM

    sarada.chelluboyena ,


    No, since you mentioned in your original post that you wanted Portfolio Items from a specific project, that is the query I provided.  If you want Portfolio Items from a Project and all of the Children of that Project, we'll proceed a different way.


    It should work if you update your query to be:




    Also, to assist you or someone else with the queries I provided above, please ensure that you put a space on each side of the equals sign in the query.  So it should be:


    query=(project = project/38840425881)


    and if using Project.Name it should be:


    query=(project.name = "The Project Name")


    You may use the URL encoding for the space, %20 if you would like, query=(project%20=%20project/38840425881)


    Also, just to be complete, you could use the URL posted first in this response to get items from the specific Project instead of using the query, you may set both the projectScopeUp and projectScopeDown to false: