Support

Expand all | Collapse all

Create folder and all his sub folder using REST API

  • 1.  Create folder and all his sub folder using REST API

    Posted 06-06-2017 04:34
    I need to copy folder from one instance of Jama to different Jama instance,it should be copied the folder and all his sub folder and items below it.
    it can be done using Rest API?

    ------------------------------
    yosef getahun
    intel
    ------------------------------


  • 2.  RE: Create folder and all his sub folder using REST API

    Posted 06-06-2017 11:39
    Thank you for posting you question in our community.
    You can do that by using GET items/{id}/children and make that call on the parent folder.
    You then need to make the same call on each children until you won't get any children. You can then build the same hierarchy on your other Jama instance.
    This will copy the folder and its children to the new Jama instance. Please keep in mind that this won't copy the older versions of those items.
    Let us know if this answers your question.

    ------------------------------
    Shabnam Jahromi
    Jama Software
    ------------------------------



  • 3.  RE: Create folder and all his sub folder using REST API

    Posted 06-07-2017 04:25
    thank's for your answer .
    unfortunately i'm not succeeded to over come on this issue :(
    I'm doing it in java and all i successes so far is to create just the parent folder without his children... wish for help .


    ------------------------------
    yosef getahun
    intel
    ------------------------------



  • 4.  RE: Create folder and all his sub folder using REST API

    Posted 06-09-2017 16:37
    Hmm, let's make sure I am clear on what you want to do and how you are implementing it.
    Consider I want to move the following to a new Jama instance creating the same hierarchy:


    First thing I need to do is to call GET items/{id}/children and using the API-ID of "My Set" for the value of id.
    The response will have 1 result which will be My Folder. Now I need to make the same call but this time for "My Folder" and replacing {id} with the API-ID of "My Folder". The second call will return 2 items below My Folder. And those two will be last because if you call the same REST call for TTT1 and TTT2 it won't return any results. That's how you know you reached the last level of the tree.
    Once you have all the info for the full hierarchy you can build the same in the new Jama instance.



    ------------------------------
    Shabnam Jahromi





    Shabnam Jahromi
    Jama Software
    ------------------------------



  • 5.  RE: Create folder and all his sub folder using REST API

    Posted 10-07-2020 09:27
    Edited by Darris 10-07-2020 14:15
    Hi,

    I'm experiencing a similar issue. I've retrieved all of the information for the components, sub-components, folders, and other items from the directory that I'd like to copy and create in another location within the same project. Using the example above, I've attempted to copy the "My Set" hierarchal build-up after obtaining the item information in a different location within the same project. Unfortunately, on the parent "My Set" is being created via REST API. The remaining items are not being created. Any syntax help would be appreciated.

    ------------------------------
    Darris Gibbons
    Aerion
    ------------------------------



  • 6.  RE: Create folder and all his sub folder using REST API

    Posted 10-26-2020 13:54

    Hi Darris,
    Sorry for the delay on responding. I checked in with a developer support engineer and it sounds like this is not possible.



    ------------------------------
    Kristina King Manager, Technical Support
    Jama Software
    ------------------------------