Get Item Variations
get
/content/published/api/v1.1/items/{id}/variations
Gets all Item Variations for the Item.
Request
Path Parameters
-
id: string
Unique identifier (ID) of an item.
Query Parameters
-
links(optional): string
Accepts a comma-separated list of rel (relation) links, which the client requires in the results. By default, all the applicable links in a resource are included in the response. Possible values are: self, canonical, describedby.
Example: links=self,canonical will only return the links with the rel property self or canonical.
Response
Supported Media Types
- application/json
200 Response
Successful operation.
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.
-
links(optional):
array links
-
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.
400 Response
Bad Request. The server is unable to process the request on the client side due to malformed syntax, invalid data or message framing.
403 Response
Forbidden.
404 Response
Not found.
500 Response
Internal server error.
Examples
The following example shows how to read variations of published item with id.
curl -i -X GET -H "Accept:application/json" 'http://<hostname>/content/published/api/v1.1/items/{id}/variations'
Example 1
This reads variations of published item with id: COREAF9E55FE83E84885A10DDA42B5160A5F, channelToken: 7ffdaa85baae4fbca4b300144f93918c.
/content/published/api/v1.1/items/COREAF9E55FE83E84885A10DDA42B5160A5F/variations?channelToken=7ffdaa85baae4fbca4b300144f93918c
Response Body
{ "data": [ { "varType": "language", "masterItem": "COREAF9E55FE83E84885A10DDA42B5160A5F", "items": [ { "id": "CORE4FD93D7B9DF2468DA6C122764D0AA85E", "value": "fr" }, { "id": "COREAF9E55FE83E84885A10DDA42B5160A5F", "value": "en-US" } ] } ], "links": [ { "href": "https://<hostname>/content/published/api/v1.1/items/COREAF9E55FE83E84885A10DDA42B5160A5F/variations?channelToken=7ffdaa85baae4fbca4b300144f93918c", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }
Example 2
This reads variations of published digital item with id: CONTAF9E55FE83E84885A10DDA42B5160A5F, channelToken:7ffdaa85baae4fbca4b300144f93918c.
/content/published/api/v1.1/items/CONTAF9E55FE83E84885A10DDA42B5160A5F/variations?channelToken=7ffdaa85baae4fbca4b300144f93918c
Response Body
{ "data": [ { "varType": "language", "masterItem": "CONTAF9E55FE83E84885A10DDA42B5160A5F", "items": [ { "id": "CONT4FD93D7B9DF2468DA6C122764D0AA85E", "value": "fr" }, { "id": "CONTAF9E55FE83E84885A10DDA42B5160A5F", "value": "en-US" } ] } ], "links": [ { "href": "https://<hostname>/content/published/api/v1.1/items/CONTAF9E55FE83E84885A10DDA42B5160A5F/variations?channelToken=7ffdaa85baae4fbca4b300144f93918c", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } }