List Relationships of an Item by slug
/content/management/api/v1.1/items/.by.slug/{slug}/relationships
Request
-
slug: string
Slug value of the latest management Item. Any special characters in slug must be encoded.
-
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 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"
}
]
}
}
]
}