List Relationships of an Item by slug

get

/content/management/api/v1.1/items/.by.slug/{slug}/relationships

Lists all Relationships of a given Item by slug.

Request

Path Parameters
  • Slug value of the latest management Item. Any special characters in slug must be encoded.
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 to list relationships of an item by its slug value.

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

Example 1

This lists all relationships of an item with slug:'content-item-1-type-1'. This is a sample response when Granular Permissions feature is not enabled.

/content/management/api/v1.1/items/.by.slug/content-item-1-type-1/relationships

Response Body

{
        "data": {
          "references": [
            {
              "id": "CORECE0B9A793CD54F26AF0853BBB5F49745",
              "links": [
                {
                  "href": "https://<hostname>/content/management/api/v1.1/items/.by.slug/ref-content-item-1-type-1",
                  "rel": "self",
                  "method": "GET",
                  "mediaType": "application/json"
                }
              ]
            }
          ],
          "referencedBy": [
            {
              "id": "CORECE0B9A793CD54F26AF0853BBB5F49745",
              "links": [
                {
                  "href": "https://<hostname>/content/management/api/v1.1/items/.by.slug/content-item-2-type-1",
                  "rel": "self",
                  "method": "GET",
                  "mediaType": "application/json"
                }
              ]
            }
          ]
        },
        "links": [
          {
            "href": "https://<hostname>/content/management/api/v1.1/items/.by.slug/content-item-1-type-1/relationships",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          }
        ]
      }

Example 2

This lists all relationships of an item with slug '3000000040002-item-c1'. 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/.by.slug/3000000040002-item-c1/relationships

Response Body

{
	    "data": {
	        "references": [
	            {
	                "id": "CONT90C026CB999E470CAEAFE0F76BB55036",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/1481786243902-DigitalAsset_0001_Blog_2_Header_1440x540px",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CORE878A5BEE021849D2A183CF94E64F1D9B",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/3000000045000-item-a2",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CONTBAEF8D6E7C44433FB553BB53D1D0B531",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/1481786243912-DigitalAsset_0011_Blog_3_Header_1440x540px",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "COREA0B53F00198F4771962526DDF83416C5",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/3000000045001-item-b2",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            }
	        ],
	        "referencedBy": [
	            {
	                "id": "CORE558B93EAE0114E749E0C7550DD0635C4",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/3000000040001-item-b1",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CORE1A9DFBE412D04E039FDDED1AAF4D64EC",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/1481786494165-item-a1",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            }
	        ],
	        "referencedBySites": []
	    },
	    "links": [
	        {
	            "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/3000000040002-item-c1/relationships",
	            "rel": "self",
	            "method": "GET",
	            "mediaType": "application/json"
	        }
	    ]
      }

Example 3

This lists all relationships of an item with slug '3000000040002-item-c1'. 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/.by.slug/3000000040002-item-c1/relationships

Response Body

{
	    "data": {
	        "references": [
	            {
	                "id": "CONT90C026CB999E470CAEAFE0F76BB55036",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/1481786243902-DigitalAsset_0001_Blog_2_Header_1440x540px",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CORE878A5BEE021849D2A183CF94E64F1D9B",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/3000000045000-item-a2",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            },
	            {
	                "id": "CONTBAEF8D6E7C44433FB553BB53D1D0B531",
	                "links": [
	                    {
	                        "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/1481786243912-DigitalAsset_0011_Blog_3_Header_1440x540px",
	                        "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/.by.slug/1481786494165-item-a1",
	                        "rel": "self",
	                        "method": "GET",
	                        "mediaType": "application/json"
	                    }
	                ],
	                "reference": {
	                    "isAccessible": true
	                }
	            }
	        ],
	        "referencedBySites": []
	    },
	    "links": [
	        {
	            "href": "http://<hostname>/content/management/api/v1.1/items/.by.slug/3000000040002-item-c1/relationships",
	            "rel": "self",
	            "method": "GET",
	            "mediaType": "application/json"
	        }
	    ]
      }
    }
  ]
}
Back to Top