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
    ------------------------------