Preview a specific item variation by variation type and value
/content/preview/api/v1.1/items/{id}/variations/{variationType}/{varValue}
Request
-
id: string
Unique identifier (ID) of an item.
-
varValue: string
Value of the variation type. Example: en-US, fr etc.
-
variationType: string
Type of the variation. Possible value: language
-
channelToken(optional): string
Channel token of the targeted channel. A channel token must be provided as either a query parameter or a request header.
-
expand(optional): string
Expand parameter provides the option of getting child resources (referenced items) inline with the item's response. Accepts a comma-separated list of field names or all. All the user-defined field names should be provided with prefix fields and followed by a period (.). If these fields are of a reference type, then the resource expands their data inline in the response. Field names are case-sensitive. When expand is specified as all (in lowercase), all the fields of the reference type of the requested item are expanded. When expand is not specified, the item response contains links to the referenced items.
Expansion of this form is supported for one level only, a request to expand beyond the first level of referenced fields will produce response HTTP 400. When the expand contains a nonexisting field as per the type definition of the requested item, the resource produces HTTP 400.
Examples:- expand=fields.field1,fields.field2
- expand=all
-
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
- application/json
200 Response
object
-
createdDate(optional):
object createdDate
Created date of the item. Map
having value, timezone, and description -
description(optional):
string
Description of the item.
-
fields(optional):
object fields
Additional Properties Allowed: additionalPropertiesUser-defined fields data. Map
-
fileExtension(optional):
string
Extension of the file.
-
fileGroup(optional):
string
-
id(optional):
string
ID of the item.
-
itemVariations(optional):
array itemVariations
-
language(optional):
string
-
links(optional):
array links
Links of the resource.
-
mimeType(optional):
string
-
name(optional):
string
Name of the item.
-
renditions(optional):
object RenditionsBean
-
slug(optional):
string
-
taxonomies(optional):
object TaxonomiesBean
-
translatable(optional):
boolean
-
type(optional):
string
Type of the item.
-
typeCategory(optional):
string
Read Only:
true
-
updatedDate(optional):
object updatedDate
Last updated date of the item. Map
having value, timezone, and description
object
object
array
-
Array of:
object Link
Link of the resource.
object
-
items(optional):
array items
Item renditions.
-
links(optional):
array links
object
-
items(optional):
array items
Item taxonomies.
-
links(optional):
array links
Resource links.
object
object
object
-
id(optional):
string
-
isMaster(optional):
boolean
-
isPublished(optional):
boolean
-
lastModified(optional):
string(date-time)
-
links(optional):
array links
-
name(optional):
string
-
setId(optional):
string
-
slug(optional):
string
-
sourceId(optional):
string
-
sourceVersion(optional):
integer(int32)
-
status(optional):
string
-
type(optional):
string
-
value(optional):
string
-
varType(optional):
string
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.
array
-
Array of:
object TaxonomyItem
TaxonomyItem
array
-
Array of:
object Link
Link of the resource.
object
-
categories(optional):
object TaxonomyCategories
CategoriesBean
-
id(optional):
string
The id of the taxonomy.
-
links(optional):
array links
-
name(optional):
string
The name of the taxonomy
-
shortName(optional):
string
The short name of the taxonomy
object
-
items(optional):
array items
Taxonomy Categories
array
-
Array of:
object CategoryItem
CategoryItem
object
-
apiName(optional):
string
The apiName of the category
-
id(optional):
string
The id of the category.
-
links(optional):
array links
-
name(optional):
string
The name of the category
-
nodes(optional):
array nodes
The nodes of the category assigned to the item.
array
-
Array of:
object CategoryNodeItem
CategoryNodeBean
object
-
apiName(optional):
string
The apiName of the Category node.
-
id(optional):
string
The id of the Category node.
-
name(optional):
string
The name of the Category node.
400 Response
403 Response
404 Response
500 Response
Examples
Example 1:
The following example shows how to preview particular language variation of item with id by submission of a GET request on the REST resource using cURL:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/items/COREAB9F07B838004C17BD168DA317F3D2BE/variations/language/fr?channelToken=f60f162cd91243bab0aa0544668ab184'
This reads particular language variation (fr) of latest management item with id: COREAB9F07B838004C17BD168DA317F3D2BE, channelToken:f60f162cd91243bab0aa0544668ab184.
Response Body
{ "id": "CORE706541CFA5974657AD0298077D70F375", "type": "Test116269655126007", "name": "test116276480961009_fr", "description": "test116276480961009_fr", "typeCategory": "ContentType", "slug": "1481786138118-test116276480961009_fr", "language": "fr", "translatable": true, "createdDate": { "value": "2020-07-07T05:28:35.324Z", "timezone": "UTC" }, "updatedDate": { "value": "2020-07-07T05:28:35.324Z", "timezone": "UTC" }, "fileExtension": "contentItem", "mimeType": "contentItem", "fileGroup": "contentItem", "fields": { "Test116269547310005": { "id": "COREFA1B111F785A4DBEA7E77E52AF42A44B", "type": "Test116219564978003", "name": "Test116326198122003", "typeCategory": "ContentType", "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/items/COREFA1B111F785A4DBEA7E77E52AF42A44B?channelToken=f60f162cd91243bab0aa0544668ab184", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/items/COREAB9F07B838004C17BD168DA317F3D2BE/variations/language/fr?channelToken=f60f162cd91243bab0aa0544668ab184", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/items/COREAB9F07B838004C17BD168DA317F3D2BE/variations/language/fr?channelToken=f60f162cd91243bab0aa0544668ab184", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/items/COREAB9F07B838004C17BD168DA317F3D2BE/variations/language/fr?channelToken=f60f162cd91243bab0aa0544668ab184", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" } ] }
Example 2:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/items/COREAB9F07B838004C17BD168DA317F3D2BE/variations/language/fr?expand=fields.Test116269547310005&channelToken=f60f162cd91243bab0aa0544668ab184'
This reads particular language variation (fr) of management item with id: COREAB9F07B838004C17BD168DA317F3D2BE, channelToken:f60f162cd91243bab0aa0544668ab184 with expanding field having name: Test116269547310005.
Response Body
{ "id": "CORE706541CFA5974657AD0298077D70F375", "type": "Test116269655126007", "name": "test116276480961009_fr", "description": "test116276480961009_fr", "typeCategory": "ContentType", "slug": "1481786138118-test116276480961009_fr", "language": "fr", "translatable": true, "createdDate": { "value": "2020-07-07T05:28:35.324Z", "timezone": "UTC" }, "updatedDate": { "value": "2020-07-07T05:28:35.324Z", "timezone": "UTC" }, "fileExtension": "contentItem", "mimeType": "contentItem", "fileGroup": "contentItem", "fields": { "Test116269547310005": { "id": "COREFA1B111F785A4DBEA7E77E52AF42A44B", "type": "Test116219564978003", "name": "Test116326198122003", "description": "Test116326198198004", "slug": "1481786138099-test116326198122003", "language": "fr", "translatable": false, "createdDate": { "value": "2020-07-07T05:28:35.324Z", "timezone": "UTC" }, "updatedDate": { "value": "2020-07-07T05:28:35.324Z", "timezone": "UTC" }, "mimeType": "contentItem", "fileGroup": "contentItem", "fields": { "Test116219132928001": "test" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/items/COREFA1B111F785A4DBEA7E77E52AF42A44B?channelToken=f60f162cd91243bab0aa0544668ab184", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/items/COREAB9F07B838004C17BD168DA317F3D2BE/variations/language/fr?channelToken=f60f162cd91243bab0aa0544668ab184&expand=fields.Test116269547310005", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/items/COREAB9F07B838004C17BD168DA317F3D2BE/variations/language/fr?channelToken=f60f162cd91243bab0aa0544668ab184&expand=fields.Test116269547310005", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/items/COREAB9F07B838004C17BD168DA317F3D2BE/variations/language/fr?channelToken=f60f162cd91243bab0aa0544668ab184", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" } ] }
Example 3:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/items/CONT3E3AFF31343940768BEBE5461F97A8BC/variations/language/fr?channelToken=f573b68c764a44f9bae0627140d8b0bd'
This reads particular language variation (fr) of latest management item with id: CONT3E3AFF31343940768BEBE5461F97A8BC, channelToken:f573b68c764a44f9bae0627140d8b0bd.
Response Body
{ "id": "CONT3E3AFF31343940768BEBE5461F97A8BC", "type": "DigitalAsset", "name": "Test522387760830005.jpg", "description": "", "slug": "cdt-digital-asset", "language": "fr", "typeCategory": "DigitalAssetType", "createdDate": { "value": "2020-07-03T07:22:31.732Z", "timezone": "UTC" }, "updatedDate": { "value": "2020-07-03T07:22:31.732Z", "timezone": "UTC" }, "fileExtension": "jpg", "fields": { "metadata": { "width": "5", "height": "5" }, "size": 631, "native": { "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/native/Test522387760830005.jpg?channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, "renditions": [ { "name": "Thumbnail", "formats": [ { "format": "jpg", "size": 631, "mimeType": "image/jpeg", "metadata": { "width": "5", "height": "5" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/Thumbnail/Test522387760830005.jpg?format=jpg&type=responsiveimage&channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "5", "height": "5" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/Thumbnail/Test522387760830005.jpg?format=webp&type=responsiveimage&channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Medium", "formats": [ { "format": "jpg", "size": 631, "mimeType": "image/jpeg", "metadata": { "width": "5", "height": "5" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/Medium/Test522387760830005.jpg?format=jpg&type=responsiveimage&channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "5", "height": "5" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/Medium/Test522387760830005.jpg?format=webp&type=responsiveimage&channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Large", "formats": [ { "format": "jpg", "size": 631, "mimeType": "image/jpeg", "metadata": { "width": "5", "height": "5" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/Large/Test522387760830005.jpg?format=jpg&type=responsiveimage&channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "5", "height": "5" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/Large/Test522387760830005.jpg?format=webp&type=responsiveimage&channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Small", "formats": [ { "format": "jpg", "size": 631, "mimeType": "image/jpeg", "metadata": { "width": "5", "height": "5" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/Small/Test522387760830005.jpg?format=jpg&type=responsiveimage&channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "5", "height": "5" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/assets/CONT3E3AFF31343940768BEBE5461F97A8BC/Small/Test522387760830005.jpg?format=webp&type=responsiveimage&channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" } ], "mimeType": "image/jpeg", "fileType": "jpeg" }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/items/CONT3E3AFF31343940768BEBE5461F97A8BC/variations/language/fr?channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/items/CONT3E3AFF31343940768BEBE5461F97A8BC/variations/language/fr?channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/items/CONT3E3AFF31343940768BEBE5461F97A8BC/variations/language/fr?channelToken=f573b68c764a44f9bae0627140d8b0bd", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" } ] } }