List Relationships of an Item
/content/management/api/v1.1/items/{id}/relationships
Request
-
id: string
id of the item.
-
links(optional): string
This parameter accepts a comma-separated list of link names. By default, this parameter gives all the links applicable. Possible values are: self, canonical, describedby
Response
- application/json
200 Response
object
-
referencedBy(optional):
array referencedBy
Referenced by ids
-
referencedBySitePlan(optional):
object Siteplanreference
Site plan reference
-
referencedBySites(optional):
array referencedBySites
Referenced by sites
-
references(optional):
array references
Reference ids
array
-
Array of:
object References
References
object
-
id(optional):
string
id of the site plan.
-
links(optional):
array links
array
-
Array of:
object ReferencedBySites
ReferencedBySites
array
-
Array of:
object References
References
object
-
id(optional):
string
id of the item.
-
links(optional):
array links
-
reference(optional):
object ItemReferenceInfo
ItemReferenceInfo
object
-
isAccessible(optional):
boolean
Whether the item is accessible.
object
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
object
-
component(optional):
string
Component of the item
-
pageId(optional):
string
Page the item added to
-
site(optional):
string
Site the item added to
304 Response
400 Response
403 Response
404 Response
500 Response
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" } ] } } ] }