Preview an item
get
/content/preview/api/v1.1/items/{id}
Previews the latest management version of the item that is ready for publishing or published. An item is uniquely identified by an ID.
Each preview item has the following information:
Each preview item has the following information:
- Standard fields: These are fields created by the system.
- id: ID of the item.
- type: Type of the item.
- name: Name of the item.
- typeCategory: Category of the type.
- description: Description of the item.
- slug : A URL part that identifies the item in human-readable format.
- language : Language of the Item.
- createdDate: Created date of the item on the channel requested.
- updatedDate: Updated date of the item on the channel requested.
- User-defined fields: These are fields created by the user when the type is defined. All user fields are available under the fields node.
Request Headers :
Is required | Header Name | Header Value |
---|---|---|
Required | channelToken | {valid channel token value} |
Optional | Accept | application/json |
Request
Path Parameters
-
id: string
Unique identifier (ID) of an item.
Query Parameters
-
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 non-existing 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
Supported Media Types
- application/json
200 Response
Successful operation.
Root Schema : Item
Type:
object
Item.
Show Source
-
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
Nested Schema : createdDate
Type:
object
Created date of the item. Map having value, timezone, and description
Nested Schema : fields
Type:
object
Additional Properties Allowed
Show Source
User-defined fields data. Map
Nested Schema : links
Type:
array
Links of the resource.
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : RenditionsBean
Type:
Show Source
object
-
items(optional):
array items
Item renditions.
-
links(optional):
array links
Nested Schema : TaxonomiesBean
Type:
Show Source
object
-
items(optional):
array items
Item taxonomies.
-
links(optional):
array links
Resource links.
Nested Schema : updatedDate
Type:
object
Last updated date of the item. Map having value, timezone, and description
Nested Schema : additionalProperties
Type:
object
Nested Schema : ItemVariation
Type:
Show Source
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
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.
Nested Schema : items
Type:
array
Item taxonomies.
Show Source
-
Array of:
object TaxonomyItem
TaxonomyItem
Nested Schema : links
Type:
array
Resource links.
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : TaxonomyItem
Type:
object
TaxonomyItem
Show Source
-
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
Nested Schema : TaxonomyCategories
Type:
object
CategoriesBean
Show Source
-
items(optional):
array items
Taxonomy Categories
Nested Schema : items
Type:
array
Taxonomy Categories
Show Source
-
Array of:
object CategoryItem
CategoryItem
Nested Schema : CategoryItem
Type:
object
CategoryItem
Show Source
-
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.
Nested Schema : nodes
Type:
array
The nodes of the category assigned to the item.
Show Source
-
Array of:
object CategoryNodeItem
CategoryNodeBean
Nested Schema : CategoryNodeItem
Type:
object
CategoryNodeBean
Show Source
-
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.
304 Response
Not changed. The request honors requests with e-tag.
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. Client is not authorized to perform this request.
404 Response
The requested resource was not found.
500 Response
Internal server error. An unexpected error condition encountered in the system.
Examples
Example:
The following example shows how to preview latest management item 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/CORE96C8FDF1883C44AB908FC56FF618D225?channelToken=37727fdc857c4d479513325888b69df0'
This reads preview of item with id: CORE96C8FDF1883C44AB908FC56FF618D225, channelToken: 37727fdc857c4d479513325888b69df0.
Response Body
{ "id": "CORE96C8FDF1883C44AB908FC56FF618D225", "type": "custitem", "typeCategory": "ContentType", "name": "c1", "description": "", "slug": "3000000000012-c1", "language": "en-US", "translatable": true, "createdDate": { "value": "2021-09-16T04:06:07.066Z", "timezone": "UTC" }, "updatedDate": { "value": "2021-09-16T04:45:11.903Z", "timezone": "UTC" }, "fileExtension": "contentItem", "fields": { "profession": "cricket", "title": "batter" }, "mimeType": "contentItem", "fileGroup": "contentItem", "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/items/CORE96C8FDF1883C44AB908FC56FF618D225?channelToken=37727fdc857c4d479513325888b69df0", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/items/CORE96C8FDF1883C44AB908FC56FF618D225?channelToken=37727fdc857c4d479513325888b69df0", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/items/CORE96C8FDF1883C44AB908FC56FF618D225?channelToken=37727fdc857c4d479513325888b69df0", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" } ] } }