List Relationships of an Item

get

/content/management/api/v1.1/items/{id}/relationships

Lists all relationships for a given item.

Request

Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ItemSubResourceRelationships
Type: object
Item SubResource.
Show Source
Nested Schema : Relationships
Type: object
Relationships
Show Source
Nested Schema : referencedBy
Type: array
Referenced by ids
Show Source
Nested Schema : Siteplanreference
Type: object
Site plan reference
Show Source
Nested Schema : referencedBySites
Type: array
Referenced by sites
Show Source
Nested Schema : references
Type: array
Reference ids
Show Source
Nested Schema : References
Type: object
References
Show Source
Nested Schema : ItemReferenceInfo
Type: object
ItemReferenceInfo
Show Source
Nested Schema : ReferencedBySites
Type: object
ReferencedBySites
Show Source

304 Response

Not modified.

400 Response

Bad request.

403 Response

Forbidden.

404 Response

Not found.

500 Response

Internal server error.
Back to Top

Examples

The following example shows how to get relationships of an item by submitting a GET request using cURL.

curl -X GET -H 'Accept: application/json' 'https://host:port/content/management/api/v1.1/items/{id}/relationships'

Example 1

This lists all relationships of item id: CORED98388F2AA724E27844821414B0B0447. This is a sample response when Granular Permissions feature is not enabled.

/content/management/api/v1.1/items/CORED98388F2AA724E27844821414B0B0447/relationships

Response Body

{
    "data": {
    "references": [
      {
        "id": "CORECE0B9A793CD54F26AF0853BBB5F49745",
        "links": [
      {
        "href": "https://host:port/content/management/api/v1.1/items/CORECE0B9A793CD54F26AF0853BBB5F49745",
        "rel": "self",
        "method": "GET",
        "mediaType": "application/json"
    }
        ]
    }
    ],
    "referencedBy": [
      {
        "id": "CORECE0B9A793CD54F26AF0853BBB5F49745",
        "links": [
      {
        "href": "https://host:port/content/management/api/v1.1/items/CORECE0B9A793CD54F26AF0853BBB5F49745",
        "rel": "self",
        "method": "GET",
        "mediaType": "application/json"
    }
        ]
    }
    ]
    },
    "links": [
    {
      "href": "https://host:port/content/management/api/v1.1/items/CORED98388F2AA724E27844821414B0B0447/relationships",
      "rel": "self",
      "method": "GET",
      "mediaType": "application/json"
    }
    ]
    }

Example 2

This lists all relationships of item id: CORE4FDEB4C45AF34766B8CB88D25BD92D90. This is a sample response when Granular Permissions feature is enabled and user has view permission on all references and referenced by items.

/content/management/api/v1.1/items/CORE4FDEB4C45AF34766B8CB88D25BD92D90/relationships

Response Body

{
	    "data": {
	        "references": [
	            {
	                "id": "CONT90C026CB999E470CAEAFE0F76BB55036",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CONT90C026CB999E470CAEAFE0F76BB55036",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CORE878A5BEE021849D2A183CF94E64F1D9B",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CORE878A5BEE021849D2A183CF94E64F1D9B",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CONTBAEF8D6E7C44433FB553BB53D1D0B531",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CONTBAEF8D6E7C44433FB553BB53D1D0B531",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "COREA0B53F00198F4771962526DDF83416C5",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/COREA0B53F00198F4771962526DDF83416C5",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            }
	        ],
	        "referencedBy": [
	            {
	                "id": "CORE558B93EAE0114E749E0C7550DD0635C4",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CORE558B93EAE0114E749E0C7550DD0635C4",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CORE1A9DFBE412D04E039FDDED1AAF4D64EC",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CORE1A9DFBE412D04E039FDDED1AAF4D64EC",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            }
	        ],
	        "referencedBySites": []
	    },
	    "links": [
	        {
	            "href": "http://<hostname>/content/management/api/v1.1/items/CORE4FDEB4C45AF34766B8CB88D25BD92D90/relationships",
	            "rel": "self",
	            "method": "GET",
	            "mediaType": "application/json"
	        }
	    ]
      }

Example 3

This lists all relationships of item id: CORE4FDEB4C45AF34766B8CB88D25BD92D90. This is a sample response when Granular Permissions feature is enabled but user doesn't have view permission on all references and referenced by items.

/content/management/api/v1.1/items/CORE4FDEB4C45AF34766B8CB88D25BD92D90/relationships

Response Body

{
	    "data": {
	        "references": [
	            {
	                "id": "CONT90C026CB999E470CAEAFE0F76BB55036",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CONT90C026CB999E470CAEAFE0F76BB55036",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CORE878A5BEE021849D2A183CF94E64F1D9B",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CORE878A5BEE021849D2A183CF94E64F1D9B",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CONTBAEF8D6E7C44433FB553BB53D1D0B531",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CONTBAEF8D6E7C44433FB553BB53D1D0B531",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "COREA0B53F00198F4771962526DDF83416C5",
	                "reference": {
	                    "isAccessible": false
	                }
	            }
	        ],
	        "referencedBy": [
	            {
	                "id": "CORE558B93EAE0114E749E0C7550DD0635C4",
	                "reference": {
	                    "isAccessible": false
	                }
	            },
	            {
	                "id": "CORE1A9DFBE412D04E039FDDED1AAF4D64EC",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/CORE1A9DFBE412D04E039FDDED1AAF4D64EC",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            }
	        ],
	        "referencedBySites": []
	    },
	    "links": [
	        {
	            "href": "http://<hostname>/content/management/api/v1.1/items/CORE4FDEB4C45AF34766B8CB88D25BD92D90/relationships",
	            "rel": "self",
	            "method": "GET",
	            "mediaType": "application/json"
	        }
	    ]
      }
    }
  ]
}
Back to Top