Skip to main content

 

Planview Customer Success Center

Relationship Service

GET /relationship/{fromBn}/{relationshipType}/{toBn}

Description:

Read a One-to-One Relationship.

Path Parameters

  • fromBn: (String) The From BN in the Relationship Pattern.
  • relationshipType: (String) The Relationship Type between the From and To BNs.
  • toBn: (String) The To BN in the Relationship Pattern.

Query Parameters (Optional)

  • qualifierBn: (String) A query parameter that is used to further describe the relationship. Some requests will not use a qualifierBn. Use the /relationshippatterns request to find relationships that use a qualifierBn.
  • checkDescendants: (Boolean) Search descendants of the from and to objects for a relationship. The default value is false.

Headers:

  • Authorization: (Your Basic Auth String)
  • Accept: application/plain;charset=UTF-8

Example:

Request:

https://[tenant-end-point]/api/c/relationship/041800000RB1/RELATED_TO/040Q00000MBZ?qualifierBn=040M000009MH
Authorization: Basic {your basic auth}
Accept: application/json;charset=UTF-8

Response:

{
  "nodes": [
      {
        "name": "Your Test System",
        "bn": "041800000RB1"
      },
      {
        "name": "Capability Thinger Nr. 5",
        "bn": "040Q00000MBZ"
      }
  ],
  "relationships": [
    {
      "fromBn": "041800000RB1",
      "toBn": "040Q00000MBZ",
      "relationshipType": "RELATED_TO",
      "qualifier": {
        "name": "Delivers",
        "bn": "040M000009MH"
      },
      "properties": null
    }
  ]
}

 

 

GET /relationships/{from}/{relationshipType}/{to}

Description:

Read One-to-Many Relationships. It will return a list of relationships that match the pattern provided. The following patterns are allowed:

(fromBn) -> [relationshipType] -> (toType)
(fromType) -> [relationshipType] -> (toBn)
(fromBn) -> [relationshipType] -> (toBn)

Path Parameters

  • from: (String) The From BN or the From Type in this Relationship Pattern.
  • relationshipType: (String) The Relationship Type between the From and To Objects. You can provide an "ANY" Relationship Type and the request will search for any relationship between the From and To objects.
  • to: (String) The To BN or the To Type in this Relationship Pattern.

Query Parameters (Optional)

  • qualifierBn: (String) A query parameter that is used to further describe the relationship. Some requests will not use a qualifierBn. Use the /relationshippatterns request to find relationships that use a qualifierBn.
  • first: (Integer) The index of an array. The default value is 0.
  • count: (Integer) The number of relationships to return. The default value is 25
  • checkDescendants: (Boolean) Search descendants of the from and to objects for a relationship. The default value is false.

Headers:

  • Authorization: (Your Basic Auth String)
  • Accept: application/plain;charset=UTF-8

Example:

Request:

https://[tenant-end-point]/api/c/relationships/041800000RB1/ANY/ORG
Authorization: Basic {your basic auth}
Accept: application/json;charset=UTF-8

Response:

{
  "first": 0,
  "count": 25,
  "nodes": [
    {
      "name": "Your Test System",
      "bn": "041800000RB1"
    },
    {
      "name": "That Test Org A",
      "bn": "040Y000009DV"
    },
    {
      "name": "Test Organization",
      "bn": "040Y00000CK5"
    },
    {
      "name": "Org 3",
      "bn": "040Y0000033Q"
    }
  ],
  "relationships": [
    {
      "fromBn": "041800000RB1",
      "toBn": "040Y000009DV",
      "relationshipType": "OWNS",
      "qualifier": {
        "name": "Owns",
        "bn": "040M0000025K"
      },
      "properties": null
    },
    {
      "fromBn": "041800000RB1",
      "toBn": "040Y00000CK5",
      "relationshipType": "SUPPORTS",
      "qualifier": {
        "name": "Supports",
        "bn": "040M0000025L"
      },
      "properties": null
    },
    {
      "fromBn": "041800000RB1",
      "toBn": "040Y0000033Q",
      "relationshipType": "USES",
      "qualifier": {
        "name": "Uses",
        "bn": "040M0000025M"
      },
      "properties": null
    }
  ]
}

 

 

GET /relationshippatterns

Description:

Read all of the available Relationship patterns between two Entity Types. This request will provide you with qualifier information, if applicable. If the "fromType" and "toType" parameters are not in the correct spot, the request will attempt to rearrange the relationship direction. If you don't provide query parameters, the response will contain all of the possible relationship patterns.

Query Parameters

  • fromType: (String) An Entity Type that represents the From Type of a Relationship Pattern.
  • toType: (String) An Entity Type that represents the To Type of a Relationship Pattern.
  • type: (String) Provide an Entity Type and view all the relationships for that collection.
  • flatten: (boolean) This query parameter changes the response layout. If flatten is "true", each qualifier will have its own object in the array.

Headers:

  • Authorization: (Your Basic Auth String)
  • Accept: application/plain;charset=UTF-8

Example:

Request:

https://[tenant-end-point]/api/c/relationshippatterns?fromType=SYS&toType=ORG
Authorization: Basic {your basic auth}
Accept: application/json;charset=UTF-8

Response:

[
  {
    "fromType": "SYS",
    "toType": "ORG",
    "relationshipType": {
      "name": "Owns",
      "type": "OWNS"
    },
    "qualifiers": [
      {
        "bn": "040M0000025K",
        "name": "Owns"
      }
    ]
  },
  {
    "fromType": "SYS",
    "toType": "ORG",
    "relationshipType": {
      "name": "Supports",
      "type": "SUPPORTS"
    },
    "qualifiers": [
      {
        "bn": "040M0000025L",
        "name": "Supports"
      }
    ]
  },
  {
    "fromType": "SYS",
    "toType": "ORG",
    "relationshipType": {
      "name": "Uses",
      "type": "USES"
    },
    "qualifiers": [
      {
        "bn": "040M0000025M",
        "name": "Uses"
      }
    ]
  }
]

 

 

PUT /relationship/{fromBn}/{relationshipType}/{toBn}

Description:

Add a relationship between two entities.

Path Parameters

  • from: (String) The From BN in this Relationship Pattern.
  • relationshipType: (String) The Relationship Type between the From and To Objects.
  • to: (String) The To BN in this Relationship Pattern.

Query Parameters (Optional)

  • qualifierBn: (String) A query parameter that is used to further describe the relationship. Some requests will not use a qualifierBn. Use the /relationshippatterns request find relationships that use a qualifierBn.

Headers:

  • Authorization: (Your Basic Auth String)
  • Accept: application/plain;charset=UTF-8
  • Content-Type: application/plain;charset=UTF-8

Example:

Request:

https://[tenant-end-point]/api/c/relationship/041800000RB1/HAS_CHILD/041800001CNQ
Authorization: Basic {your basic auth}
Accept: application/json;charset=UTF-8
Content-Type: application/json;charset=UTF-8

Response:

{
  "successfulBns": [
    "041800001CNQ",
    "041800000RB1"
  ],
  "proposedChangeBns": [],
  "transactionIds": [
    "6af6e7a6af164464bb65daab0437dcff"
  ]
}

 

 

DELETE /relationship/{fromBn}/{relationshipType}/{toBn}

Description:

Remove a relationship between two entities.

Path Parameters

  • from: (String) The From BN in this Relationship Pattern.
  • relationshipType: (String) The Relationship Type between the From and To Objects.
  • to: (String) The To BN in this Relationship Pattern.

Query Parameters (Optional)

  • qualifierBn: (String) A query parameter that is used to further describe the relationship. Some requests will not use a qualifierBn. Use the /relationshippatterns request find relationships that use a qualifierBn.

Headers:

  • Authorization: (Your Basic Auth String)
  • Accept: application/plain;charset=UTF-8
  • Content-Type: application/plain;charset=UTF-8

Example:

Request:

https://[tenant-end-point]/api/c/relationship/041800000RB1/SUPPORTS/040Y00000CK5?qualifierBn=040M0000025L
Authorization: Basic {your basic auth}
Accept: application/json;charset=UTF-8
Content-Type: application/json;charset=UTF-8

Response:

{
  "successfulBns": [
    "040Y00000CK5",
    "041800000RB1"
  ],
  "proposedChangeBns": [],
  "transactionIds": [
    "a8d7425655554aedac0a20fb5e3b412f"
  ]
}