Add/Move Existing Project to Portfolio (exclusively by code using the API)

Hello there, I am trying to move an already existing project (rn not assigned to any portfolio) to a Portfolio. I do not want to simply add a new item because I need this project to stick to a predefined template so a critical form is included. Is there any solution to, say, pick my project by ID and move it to a portfolio?
Alternatively: Can I determine the location where a duplicate is created? Per default its in organizations, in a perfect world I’d be able to create the duplicate directly in a portfolio of my choice.

Thanks, Friedrich

Edit: I should have mentioned that I want to manage these projects exclusively by code using the API, not manually .

Hi @anon92568344, I have been able to do this myself, you first need to get a list of your portfolios (if you have more then one), also note that you have to be the owner of the portfolio (you cannot to my knowledge move a project into a portfolio you do not own). Once you have a list of your portfolios, I would do a name search to find the one you want the project to be put into save the gid of the portfolio for later use. After that you would need to get the gid of the project you want, I used the same method as before (getting all projects and finding the project I need by name). Once you have both of those pieces of info you can post to the portfolios/{portfolio_gid}/addItem endpoint.

2 Likes