Support

Expand all | Collapse all

create relationship using REST API

  • 1.  create relationship using REST API

    Posted 12-19-2018 10:37
    Hello,
    I'm using REST API 'POST RELATIONSHIPS' with this simple body:
    {
    "fromItem": 2370615,
    "toItem": 2547224
    }
    I'm getting the following answer:
    "meta": {
    "status": "Bad Request",
    "timestamp": "2018-12-19T14:34:28.857+0000",
    "message": "Relationship violates rules configured for the project: from item ID: 2370615, to item ID: 2547224"
    }

    I don't understand why? If I'm doing this relationship manually it's working well...

    I triead also adding optional parameter relationshipType:
    {
    "fromItem": 2370615,
    "toItem": 2547224,
    "relationshipType":6
    }
    But answer is the same ;(

    Please could you help me?
    Regards

    ------------------------------
    Fab
    ------------------------------


  • 2.  RE: create relationship using REST API

    Posted 12-20-2018 07:17
    No answer...

    How Can I get more help ?
    Error message is not enough explicit, and documenttion do not give more details...

    ------------------------------
    Casta Fab
    fabiencasta@gmail.com
    ------------------------------



  • 3.  RE: create relationship using REST API

    Posted 12-20-2018 14:46
    Edited by Chloe Elliott 12-20-2018 15:33
    Hi Casta:

    Welcome to the Community! Your error message is indicating a relationship rule violation between these two item types. I would have your Organization Administrator double check that these two items are actually allowed to relate to one another. It could be something configured in the Jama Workflow which is creating this error message with the REST API.

    Best,

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



  • 4.  RE: create relationship using REST API

    Posted 01-10-2019 11:36
    Hi,
    I solved the problem.
    I wanted to create relationship from object typed X (project A) to object typed Y (project B)

    I had a relationship configuration with a relationship X to Y possible set for project A
    • It was possible to create via JAMA web interface relationship from object X (project A)  to Y (project B)
    • It wasn't possible to create via JAMA REST API relationship from object X (project A)  to Y (project B)

    I added reverse relationship  (Y to X) configuration with a relationship possible set for project B
    Now it is possible to :
    • create via JAMA web interface relationship from object X (project A)  to Y (project B)
    •  to create via JAMA REST API relationship from object X (project A)  to Y (project B)

    It means that API REST has some restrictions that are not applied to JAMA web interface.
    It's clearly an issue.

    regards

    ------------------------------
    Fab
    ------------------------------



  • 5.  RE: create relationship using REST API

    Posted 2 days ago
    Is it resolved yet? The solution posted by @Casta is a patch. ​

    ------------------------------
    Pankaj Trivedi Pr. Systems Architect
    Thales Avionics, Inc. (In-Flight Entertainment & Connectivity Systems)
    ------------------------------