Support

Expand all | Collapse all

Synchronize/Connect Two Jama Items Using REST

  • 1.  Synchronize/Connect Two Jama Items Using REST

    Posted 12-11-2018 13:14
    Hi @Jama,

    I'm trying to make synchronize connection between Jama Items using the REST API. I don't need to actually synchronize the items but  we just want the synchronize connections made. ​I read through the API documentations on Github and I'm pretty sure it is possible to make the connections. I just can't find any sync function in JamaItem, JamaInstanceor any other common class. Can any Jama developer help me with this? Thank you!

    Sincerely,
    Tianxing Wang

    ------------------------------
    Tianxing Wang
    ------------------------------


  • 2.  RE: Synchronize/Connect Two Jama Items Using REST

    Posted 12-11-2018 15:48
    Edited by Chloe Elliott 12-11-2018 15:49
    Tianxing:

    Hi and thank you for posting in the Community! I have a few questions and a few resources for you. I am uncertain of what you mean by "don't need to actually synchronize the items but, we just want the synchronize connections made"? Are you meaning that you want to "relate" the items together, which helps maintain the workflow and the project structure by setting up relationship rules? Or do you want items across one or more projects sharing a similar global ID so that changes to one item will be made to the other (synchronization)? Are you saying that you want to use the REST API to just double check and make sure these items are synced and/or related?

    I suggest you look in our REST API documentation there are several Endpoints under Items to perform GET and POST operations. The operations about Sync are numbered 26-29. There are also several GET operations for upstream/downstream relationships 13-14 and 34-35.

    If it is the relationships you are interested in, here are the Relationships Endpoints.

    Also, could you be so kind as to point me to where you are getting the terms "JamaItem" and "JamaInstance" I couldn't find any references to these in my documentation and I would like to correct them if they need correcting.

    Thank you,

    ------------------------------
    Chloe Elliott
    Jama Software
    Portland OR
    ------------------------------



  • 3.  RE: Synchronize/Connect Two Jama Items Using REST

    Posted 12-11-2018 20:16
    Hi Chole!

    Thank you for the quick reply! By synchronize connection I mean that we want items across one or more projects sharing a similar global ID so that changes to one item will be made to the other. I'm building a Java application that uses the Jama REST API to make the connection.

    From what I understand, if I want my own app to GET and POST data to our database, I need to clone the Jama API's Github repository and use the functionalities it provides accordingly. Usually there are built-in functions ready to use in the JamaItem and JamaInstance class. Some examples would be getFieldValueByName() and getChildren(). I'm using the repository called "REST Client" that includes java code to establish connections from my app to our Jama database but somehow there is no documentations on Item Synchronization. Here is the link to JamaItem:
    https://github.com/JamaSoftware/RestClient/blob/master/src/main/java/com/jamasoftware/services/restclient/jamadomain/lazyresources/JamaItem.java

    Is there a way to find/add Synchronization functionality to the Jama API I'm using? Thank you!

    Best Regards,
    Tianxing Wang


    ------------------------------
    Tianxing Wang
    ------------------------------



  • 4.  RE: Synchronize/Connect Two Jama Items Using REST

    Posted 12-12-2018 14:48
    Tianxing:

    Thanks for the clarification and pointing me to the Java application sample you were referring to. The GitHub example code, "RestClient" is provided "as-is" is mostly there as an example of what you can do with our Jama REST API using Java programming. We have provided many examples using other code bases as well. You could clone this GitHub repo and then use the examples, in combination with our REST API, to help guide you in programming the necessary functions you need to make. To help you in this task here are some resources:

    1. You can use Swagger, to test out your REST Operations with your instance of Jama. Here is a link to how you can set that up: Swagger instructions.

    2. Here are the REST API endpoints you should look at:
    I think the POST /items/{id}/synceditems might be the best bet.

    3. And here is the documentation for the REST API. This link should send you right to the "Items" endpoints.

    4. If you find that you need more guided help you can also talk to your Account Manager who can set you up to get some guidance from Professional Services, they can do more in-depth trainings on our REST API.


    Best,

    ------------------------------
    Chloe Elliott
    Jama Software
    Portland OR
    ------------------------------