List Variations of an Item by slug
get
/content/management/api/v1.1/items/.by.slug/{slug}/variations
Lists all Variations of a given Item by slug.
Request
Path Parameters
-
slug: string
Slug value of the latest management Item. Any special characters in slug must be encoded.
Query Parameters
-
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
Supported Media Types
- application/json
200 Response
OK.
Nested Schema : VariationsInfo
Type:
object
Variations Info.
Show Source
-
items(optional):
array items
Content item variations.
-
links(optional):
array links
-
masterItem(optional):
string
Master item.
-
setId(optional):
string
Variation set id.
-
varType(optional):
string
Variation type name.
Nested Schema : items
Type:
array
Content item variations.
Show Source
-
Array of:
object Language
LanguageItem
Nested Schema : Language
Type:
object
LanguageItem
Show Source
-
id(optional):
string
id of the item.
-
isPublished(optional):
boolean
Whether the item is ever published.
-
links(optional):
array links
-
name(optional):
string
name of the item.
-
status(optional):
string
status of item
-
value(optional):
string
Language value
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
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.
304 Response
Not modified.
400 Response
Bad request.
403 Response
Forbidden.
404 Response
Not found.
500 Response
Internal server error.
Examples
The following example shows how to list variations 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}/variations'
Example 1:
This lists variations of an item with slug:'.by.slug/content-item-1-type-1'.
/content/management/api/v1.1/items/.by.slug/content-item-1-type-1/variations
Response Body
{ "data": [ { "varType": "language", "masterItem": "CORE03686186463D44D286FE9A7004AA36C6", "items": [ { "id": "CORE03686186463D44D286FE9A7004AA36C6", "value": "en-US", "status": "draft", "isPublished": true }, { "id": "CORECD67178407B04607A20A92CEBD637695", "value": "fr-FR", "status": "draft", "isPublished": true }, { "id": "CORE6D2AA74D80D44135BB8553695B13A93C", "value": "ar", "status": "draft", "isPublished": true } ] } ], "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/.by.slug/content-item-1-type-1/variations", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }
Example 2:
This lists variations of an item with slug:'.by.slug/digital-asset-1-cdt-1'.
/content/management/api/v1.1/items/.by.slug/digital-asset-1-cdt-1/variations
Response Body
{ "data": [ { "varType": "language", "masterItem": "CONT03686186463D44D286FE9A7004AA36C6", "items": [ { "id": "CONT03686186463D44D286FE9A7004AA36C6", "value": "en-US", "status": "draft", "isPublished": true }, { "id": "CONTCD67178407B04607A20A92CEBD637695", "value": "fr-FR", "status": "draft", "isPublished": true }, { "id": "CONT6D2AA74D80D44135BB8553695B13A93C", "value": "ar", "status": "draft", "isPublished": true } ] } ], "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/.by.slug/digital-asset-1-cdt-1/variations", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } }