Support

Expand all | Collapse all

Global ID reuse via REST API

  • 1.  Global ID reuse via REST API

    Posted 06-02-2019 06:08
    Edited by ben 06-03-2019 00:39
    Hello,

    We are using Jama Connect 8.25.3
    Currently "Reusing" an item may clone the item with the similar Global ID. when creating items via REST API with an used Global ID- an exception occurs. How can we overlap this ? enabling it via REST API will make our lives easier :)


    ------------------------------
    ben gilad
    Intel
    ------------------------------


  • 2.  RE: Global ID reuse via REST API

    Posted 06-03-2019 07:59
    Edited by Chloe 06-03-2019 09:56
    Ben:

    Yes, "reusing" an item will duplicate the item and you do have the option of creating it with the same Global ID or not. What is the "exception" you are experiencing with the REST API and Reuse?

    Adding on: are you using this?

    Best,

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



  • 3.  RE: Global ID reuse via REST API

    Posted 08-17-2021 00:03
    Edited by Romain 08-17-2021 00:07
    When duplicating an element with same GID using JamaClient.post_item() on Jama Connect 8.36.4, I get the following error:

    ERROR:py_jama_rest_client:API Client Error. Status: 400 Message: Global ID cannot be updated -
    The item's Global ID prefix cannot be the same as the system's configured Global ID prefix

    What is this error meaning?
    What is "system's configured Global ID prefix"?

    By not setting the global_id parameter when calling JamaClient.post_item(), the element is well created at the expected location with a new GID.

    How to create an element with a given GID ?


    ------------------------------
    Romain Baeriswyl
    MMSI
    ------------------------------



  • 4.  RE: Global ID reuse via REST API

    Posted 08-23-2021 14:55

    Good afternoon, Romain. 

    Thank you for reaching out. We need to clarify that the system's configured Global ID prefix, the one used by default, is "GID". When you select "setGlobalIdManually" in the POST /items endpoint, the API is expecting for the user to set a NEW global Id for the item. The error you are getting is essentially because it's trying to create a new global id with the prefix "GID" and the system will not allow it because the prefix "GID" is in use. 

    To sync items via the API you need to use POST /items/{id}/synceditems to sync two items to the same global ID. The endpoint POST /items allows for the CREATION of a new global Id only. 

    I hope this helps. If you need further assistance, you may submit a support ticket so we can work to resolve this in partnership. 



    ------------------------------
    [Amanda] [Jennewein] She/Her]
    [Manager, Customer Support]
    [Jama Software]
    [Portland] [OR]
    ------------------------------