Update a Digital Item with new File
/content/management/api/v1.1/items/{id}/
Notes :
The request is a multipart HTTP request where one part is a JSON object (item) with item details (refer - examples) and the other part is the content of the file itself (file). The item part is optional. translatable node value in item part can not be updated via this request. There are are some extended operations to achieve that.
If item is not published or not scheduled for publish, and language node is not passed then we set language from existing version. If language is not set on existing version then we set repository default language.
Request
- multipart/form-data
-
id: string
id of the item.
-
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
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
-
file: file
File uploaded
-
item(optional): string
Updates an item with the given information in the payload. The fields createdBy, createdDate, updatedBy, updatedDate, typeCategory, variations, channels, collections, relationships, publishInfo, suggestedTaxonomies and links will be ignored even if given in the payload. In case of update with file and metadata, if the name field is missing in payload, then the name of the updated item will be based on the name of the file uploaded (fileName in the file part of form-data). In case of update with only file, extension in the existing name will be replaced with new file extension. The Model has to be similar to the update Item Payload.
Response
- application/json
200 Response
object
typeCategory
-
changes(optional):
object ItemSubResourceListChangesInfo
Item SubResource.
-
channels(optional):
object ItemSubResourceListChannelId
Item SubResource.
-
collections(optional):
object ItemSubResourceListCollectionId
Item SubResource.
-
connectorFileInfo(optional):
object ItemSubResourceConnectorFileInfo
Item SubResource.
-
connectorId(optional):
string
Connector Id of the item.
-
connectorSyncEnabled(optional):
boolean
Connector Sync Enabled flag of the item.
-
createdBy(optional):
string
Created by.
-
createdByUser(optional):
object User
User object
-
createdDate(optional):
object date
date
-
description(optional):
string
description of the item
-
fields(optional):
object fields
Read Only:
true
Additional Properties Allowed: additionalPropertiesUser-defined fields data. Map. All the user-defined fields required in the type definition must be provided under this property in PUT and POST request. -
fileExtension(optional):
string
Extension of the file.
-
id(optional):
string
id of the item. It is a required property in the get response and put request whereas it is not required in the post request.
-
isPublished(optional):
boolean
Whether the item is ever published.
-
language(optional):
string
Language of the item.
-
languageIsMaster(optional):
boolean
Whether the item is master.
-
links(optional):
array links
Links
-
lockInfo(optional):
object ItemSubResourceLockInfo
Item SubResource.
-
metadata(optional):
object ItemMetadataInfo
ItemMetadataInfo
-
name(optional):
string
Name of the item. It is a required property in the get response and post/put request.
-
permissions(optional):
object ItemSubResourceListAction
Item SubResource.
-
publishedChannels(optional):
object ItemSubResourceListChannelId
Item SubResource.
-
publishInfo(optional):
object ItemSubResourceListPublishInfo
Item SubResource.
-
reference(optional):
object ItemReferenceInfo
ItemReferenceInfo
-
relationships(optional):
object ItemSubResourceRelationships
Item SubResource.
-
repositoryId(optional):
string
Repository of the item. It is a required property in the get response and post/put request.
-
scheduled(optional):
boolean
-
slug(optional):
string
URL slug of the item.
-
sourceId(optional):
string
Source Id.
-
status(optional):
string
Current status of the item.
-
suggestedTaxonomies(optional):
object ItemSubResourceListSuggestedTaxonomyInfo
Item SubResource.
-
tags(optional):
object ItemSubResourceListTag
Item SubResource.
-
taxonomies(optional):
object ItemSubResourceListTaxonomyInfo
Item SubResource.
-
translatable(optional):
boolean
Whether the item is translatable.
-
type(optional):
string
Name of the type. It is a required property in the get response and post/put request.
-
typeCategory(optional):
string
Read Only:
true
-
updatedBy(optional):
string
Updated by.
-
updatedByUser(optional):
object User
User object
-
updatedDate(optional):
object date
date
-
variations(optional):
object ItemSubResourceListVariationsInfo
Item SubResource.
-
version(optional):
string
The current revision version of this item.
-
versionInfo(optional):
object ItemSubResourceListVersionInfo
Item SubResource.
-
video(optional):
object VideoBean
VideoBean
-
workflowInstances(optional):
object WorkflowField
All mapped workflow fields
-
workflows(optional):
object ItemSubResourceListWorkflowInfo
Item SubResource.
object
-
displayName(optional):
string
Read Only:
true
display name of the user. -
email(optional):
string
Read Only:
true
email of the user. -
userID(optional):
integer(int64)
Read Only:
true
id of the user. -
userName(optional):
string
Read Only:
true
name of the user.
object
true
object
-
exif(optional):
object EXIFMetadata
EXIF Metadata
-
links(optional):
array links
Links
-
transcripts(optional):
object VideoTranscriptMetadata
Video Transcription Metadata
object
-
isAccessible(optional):
boolean
Whether the item is accessible.
object
-
duration(optional):
string
Read Only:
true
The duration of the video in ISO 8601 format. -
isFormatSupported(optional):
boolean
Read Only:
true
A boolean expressing if the video file format is supported. -
playback(optional):
object PlaybackBean
PlaybackBean
-
processing(optional):
object ProcessingBean
ProcessingBean
-
strip(optional):
object StripBean
StripBean
object
-
aggregationResults(optional):
array aggregationResults
Aggregation results.
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Check whether there are more pages to fetch.
-
items(optional):
array items
Singular resources contained in the collection.
-
limit(optional):
integer(int32)
Actual page size used by the server. This might not be the same as what the client requests.
-
links(optional):
array links
Links of the resource.
-
offset(optional):
integer(int32)
The actual index from which the singular resources are returned.
-
pinned(optional):
array pinned
Pinned items. Shows items pinned at the top of search list
-
scrollId(optional):
string
scrollId if the search resolved to a scroll search.
-
totalResults(optional):
integer(int32)
Total number of rows that satisfy the client request (excluding the paging parameters.)
object
-
links(optional):
array links
-
source(optional):
string
Sub-resource associated to this item which is source of this change.
-
type(optional):
string
Type of change tracked for the given source.
-
value(optional):
boolean
True indicates a change. False indicates no current changes for this source/type.
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
-
id(optional):
string
-
isPrimaryChannel(optional):
boolean
Indicates if channel is primary for an asset.
-
links(optional):
array links
Links
-
name(optional):
string
object
-
connectorId(optional):
string
Connector id.
-
id(optional):
string
File id.
-
inUse(optional):
boolean
Represents whether the latest version of asset is using the file content.
-
version(optional):
integer(int32)
File version
object
object
-
isLocked(optional):
boolean
Represents whether the item is locked or not.
-
lockedBy(optional):
string
Locked by user
-
lockedDate(optional):
object date
date
object
-
aggregationResults(optional):
array aggregationResults
Aggregation results.
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Check whether there are more pages to fetch.
-
items(optional):
array items
Singular resources contained in the collection.
-
limit(optional):
integer(int32)
Actual page size used by the server. This might not be the same as what the client requests.
-
links(optional):
array links
Links of the resource.
-
offset(optional):
integer(int32)
The actual index from which the singular resources are returned.
-
pinned(optional):
array pinned
Pinned items. Shows items pinned at the top of search list
-
scrollId(optional):
string
scrollId if the search resolved to a scroll search.
-
totalResults(optional):
integer(int32)
Total number of rows that satisfy the client request (excluding the paging parameters.)
object
-
aggregationResults(optional):
array aggregationResults
Aggregation results.
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Check whether there are more pages to fetch.
-
items(optional):
array items
Singular resources contained in the collection.
-
limit(optional):
integer(int32)
Actual page size used by the server. This might not be the same as what the client requests.
-
links(optional):
array links
Links of the resource.
-
offset(optional):
integer(int32)
The actual index from which the singular resources are returned.
-
pinned(optional):
array pinned
Pinned items. Shows items pinned at the top of search list
-
scrollId(optional):
string
scrollId if the search resolved to a scroll search.
-
totalResults(optional):
integer(int32)
Total number of rows that satisfy the client request (excluding the paging parameters.)
array
-
Array of:
object ItemExtractedExifBean
ItemExtractedExifBean
array
-
Array of:
object Link
Link of the resource.
array
object
-
floatValue(optional):
number(float)
The float value of the EXIF field. This value will be a numeric representation of the EXIF field value with decimal precision.
-
handle(optional):
string
The handle or EXIF field name. This value is not translatable.
-
integerValue(optional):
integer(int32)
The integer value of the EXIF field. This value will be a numeric representation of the EXIF field value without a decimal point.
-
links(optional):
array links
Links
-
rawId(optional):
string
The ID of the EXIF field. Uniquely identifies one EXIF field.
-
rawValue(optional):
string
The raw EXIF field value. This value can be a numeric value out of a predefined value list or a text value.
-
stringValue(optional):
string
The text value of the EXIF field. This value will be a text representation of the EXIF field value.
-
type(optional):
string
The data type of the EXIF field. (date, integer, float, string).
-
value(optional):
string
The display value of the EXIF field. This value will be a text representation of the actual type value of the EXIF field (date, int, float, string).
array
-
Array of:
object Videotranscript
Video transcript
array
-
Array of:
object Link
Link of the resource.
array
object
-
end(optional):
string
End of each transcript node.
-
id(optional):
string
Id of each transcript node.
-
links(optional):
array links
Links
-
start(optional):
string
Start of each transcript node.
-
text(optional):
string
Text of each transcript node.
object
-
action(optional):
string
Allowed Values:
[ "view", "update", "create", "delete" ]
action is allowed on the resource
object
-
channel(optional):
string
Target name
-
links(optional):
array links
Links
-
publishedBy(optional):
string
Published by
-
publishedDate(optional):
object date
date
-
slug(optional):
string
Published slug
-
version(optional):
string
Published version
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
-
component(optional):
string
Component of the item
-
pageId(optional):
string
Page the item added to
-
site(optional):
string
Site the item added to
array
-
Array of:
object SuggestedTaxonomyInfo
SuggestedTaxonomyInfo
object
-
categories(optional):
array categories
Categories in the Suggested Taxonomy the item belongs to.
-
id(optional):
string
-
links(optional):
array links
-
name(optional):
string
-
shortName(optional):
string
array
object
-
apiName(optional):
string
The apiName of the category assigned to the item.
-
id(optional):
string
-
isRejected(optional):
boolean
Status of the Suggested Category for the Item.
-
links(optional):
array links
-
name(optional):
string
-
nodes(optional):
array nodes
Nodes in the category assigned to the item.
-
order(optional):
integer(int32)
Probability order of the Suggested Category across all the Taxonomies assigned to the repository.
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.
object
-
language:
string
language of the tag.
-
links(optional):
array links
Links
-
name:
string
Name of the tag.
object
-
categories(optional):
array categories
Categories in the Taxonomy the item belongs to.
-
id(optional):
string
-
links(optional):
array links
-
name(optional):
string
-
shortName(optional):
string
object
-
apiName(optional):
string
The apiName of the category assigned to the item.
-
id(optional):
string
-
links(optional):
array links
-
name(optional):
string
-
nodes(optional):
array nodes
Nodes in the category assigned to the item.
object
-
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.
array
-
Array of:
object Language
LanguageItem
object
-
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
object
-
latestVersion(optional):
string
Latest version
-
publishedVersion(optional):
string
Published version
object
-
adaptiveStreams(optional):
object AdaptiveStreamsBean
AdaptiveStreamsBean
object
-
progress(optional):
string
Read Only:
true
The progress of the background process. The value of this field will be one of PENDING, SUCCEEDED or FAILED.
object
-
frame(optional):
object StripFrameBean
StripFrameBean
object
-
dash(optional):
object PlaybackBean
PlaybackBean
-
hls(optional):
object PlaybackBean
PlaybackBean
object
-
count(optional):
integer(int32)
Read Only:
true
The number of frames in the strip image. -
height(optional):
integer(int32)
Read Only:
true
The height of the strip image. -
width(optional):
integer(int32)
Read Only:
true
The width of the strip image.
array
-
Array of:
object WorkflowInfo
WorkflowInfo.
array
-
Array of:
object Link
Link of the resource.
array
object
-
id(optional):
string
Workflow id.
-
instanceId:
string
Workflow instance id.
-
isCompleted(optional):
boolean
If workflow instance is completed or not in OIC.
-
links(optional):
array links
Links
-
name(optional):
string
Workflow name.
-
status(optional):
string
Workflow status.
-
submittedBy(optional):
string
Submitted by user
-
submittedDate(optional):
object date
date
400 Response
403 Response
404 Response
500 Response
Examples
The following example shows how to update a field by submitting a PUT request on a REST resource using cURL.
curl -X PUT -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/items/{id}'
Example 1:
This updates digital item having id: CONTFFFEC388CFD044D8A34D2F8C46EA5786 with given file in payload and the updated digital item will have name same as before update with extension replaced/appended with extension of the updated file. The request is a multipart request with a specified boundary delimiter of the following general form. Replace payload with your own data. Replace payload with your own data.
/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786
Request Headers
{ "Content-Type":"multipart/form-data; boundary=---1234567890", "X-Requested-With":"XMLHttpRequest" }
Request Payload
-----1234567890 Content-Disposition: form-data; name="file"; filename="example1.png" Content-Type: image/png <File Content> -----1234567890--
Response Body
{ "id": "CONTFFFEC388CFD044D8A34D2F8C46EA5786", "type": "DigitalType1", "name": "Item1.png", "description": "Item1 description", "slug": "digitaltype1-filename", "typeCategory": "DigitalAssetType", "createdBy": "cecusername", "createdDate": { "value": "2018-11-16T06:19:15.641Z", "timezone": "UTC" }, "updatedBy": "cecusername", "updatedDate": { "value": "2018-11-16T07:19:15.641Z", "timezone": "UTC" }, "repositoryId": "FF3F3EA7B9AA02DAB862BD32428A3162608D14D20E49", "status":"draft", "isPublished": false, "languageIsMaster": true, "translatable": false, "version": "0.2", "fileExtension": "png", "fields": { "metadata": { "width": "217", "height": "233" }, "size": 5313, "native": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/native/example1.png", "rel": "self", "method": "GET", "mediaType": "image/png" } ] }, "renditions": [ { "name": "Thumbnail", "formats": [ { "format": "jpg", "size": 0, "mimeType": "image/jpeg", "metadata": { "width": "150", "height": "161" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Thumbnail/example1.png?format=jpg&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "150", "height": "161" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Thumbnail/example1.png?format=webp&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Medium", "formats": [ { "format": "jpg", "size": 0, "mimeType": "image/jpeg", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Medium/example1.png?format=jpg&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Medium/example1.png?format=webp&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Large", "formats": [ { "format": "jpg", "size": 0, "mimeType": "image/jpeg", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Large/example1.png?format=jpg&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Large/example1.png?format=webp&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Small", "formats": [ { "format": "jpg", "size": 0, "mimeType": "image/jpeg", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Small/example1.png?format=jpg&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Small/example1.png?format=webp&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" } ], "mimeType": "image/png", "fileGroup": "Images", "fileType": "png" }, "variations": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/variations", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "versionInfo": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/versionInfo", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "publishInfo": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/publishInfo", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "channels": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/channels", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "publishedChannels": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/publishedChannels", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "collections": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/collections", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "relationships": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/relationships", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "tags": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/tags", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "taxonomies": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/taxonomies", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/metadata-catalog/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" } ]}
Example 2:
This updates digital item with id: CONT92D59C9D771844019E16BD47E2AA36C2 with user fields data and file in given payload. The request is a multipart request with a specified boundary delimiter of the following general form. Replace payload with your own data. Replace payload with your own data.
/content/management/api/v1.1/items/CONT92D59C9D771844019E16BD47E2AA36C2
Request Header
The request is a multipart request with a specified boundary delimiter of the following general form:
Content-Type: multipart/form-data; boundary=---1234567890
X-Requested-With: XMLHttpRequest
Request Payload
-----1234567890 Content-Disposition: form-data; name="item" Content-Type: application/json { "id": "CONT92D59C9D771844019E16BD47E2AA36C2", "type": "DigitalType2", "description": "description of Item2", "translatable": true, "language": "en-US", "repositoryId": "FF3F3EA7B9AA02DAB862BD32428A3162608D14D20E49", "translatable": true, "fields": { "type2_text": "sample_string1", "type2_largeText": "sample_string2", "type2_number": 18, "type2_decimal": 18.34, "type2_boolean": true, "type2_dateTime": { "value": "2018-11-30T11:51:21+05:30", "timezone": "Asia/Calcutta" } } } -----1234567890 Content-Disposition: form-data; name="file"; filename="example1.png" Content-Type: image/png <File Content> -----1234567890--
Example 3:
This updates non-file shared translation digital item with id: CONT17CEABD6DD2D49F587DCE0AB4AA3A5D3 with its own file in given payload. The request is a multipart request with a specified boundary delimiter of the following general form. Replace payload with your own data.
/content/management/api/v1.1/items/CONT17CEABD6DD2D49F587DCE0AB4AA3A5D3
Request Header
{ "Content-Type":"multipart/form-data; boundary=---1234567890", "X-Requested-With":"XMLHttpRequest" }
Request Payload
-----1234567890 Content-Disposition: form-data; name="item" Content-Type: application/json { "id": "CONT17CEABD6DD2D49F587DCE0AB4AA3A5D3", "type": "NFSType1", "name": "example1updated.png", "description": "description of Item2", "translatable": "true", "language": "fr", "repositoryId": "FF3F3EA7B9AA02DAB862BD32428A3162608D14D20E49", "translatable": true, "fields": { "type2_text": "sample_string1", "type2_largeText": "sample_string2", "type2_number": 18, "type2_decimal": 18.34, "type2_boolean": true, "type2_dateTime": { "value": "2018-11-30T11:51:21+05:30", "timezone": "Asia/Calcutta" } } } -----1234567890 Content-Disposition: form-data; name="file"; filename="example1updated.png" Content-Type: image/png <File Content> -----1234567890--
Example 4:
This updates digital item having id: CONTFFFEC388CFD044D8A34D2F8C46EA5786 with different name in item json, file having different name in payload and the updated digital item will have updated name given in payload along with file extension appended if not already present. The request is a multipart request with a specified boundary delimiter of the following general form. Replace payload with your own data.
/content/management/api/v1.1/items/CONT17CEABD6DD2D49F587DCE0AB4AA3A5D3
Request Header
{ "Content-Type":"multipart/form-data; boundary=---1234567890", "X-Requested-With":"XMLHttpRequest" }
Request Payload
-----1234567890 Content-Disposition: form-data; name="item" Content-Type: application/json { "id": "CONT92D59C9D771844019E16BD47E2AA36C2", "type": "DigitalType2", "name": "Item2", "description": "description of Item2", "translatable": "true", "language": "en-US", "repositoryId": "FF3F3EA7B9AA02DAB862BD32428A3162608D14D20E49", "translatable": false, } -----1234567890 Content-Disposition: form-data; name="file"; filename="example2.png" Content-Type: image/png <File Content> -----1234567890--
Response Body
{ "id": "CONTFFFEC388CFD044D8A34D2F8C46EA5786", "type": "DigitalType1", "name": "Item2.png", "description": "Item1 description", "slug": "digitaltype1-filename", "typeCategory": "DigitalAssetType", "createdBy": "cecusername", "createdDate": { "value": "2018-11-16T06:19:15.641Z", "timezone": "UTC" }, "updatedBy": "cecusername", "updatedDate": { "value": "2018-11-16T07:19:15.641Z", "timezone": "UTC" }, "repositoryId": "FF3F3EA7B9AA02DAB862BD32428A3162608D14D20E49", "status":"draft", "isPublished": false, "languageIsMaster": true, "translatable": false, "version": "0.2", "fileExtension": "png", "fields": { "metadata": { "width": "217", "height": "233" }, "size": 5313, "native": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/native/Item2.png", "rel": "self", "method": "GET", "mediaType": "image/png" } ] }, "renditions": [ { "name": "Thumbnail", "formats": [ { "format": "jpg", "size": 0, "mimeType": "image/jpeg", "metadata": { "width": "150", "height": "161" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Thumbnail/Item2.png?format=jpg&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "150", "height": "161" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Thumbnail/Item2.png?format=webp&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Medium", "formats": [ { "format": "jpg", "size": 0, "mimeType": "image/jpeg", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Medium/Item2.png?format=jpg&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Medium/Item2.png?format=webp&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Large", "formats": [ { "format": "jpg", "size": 0, "mimeType": "image/jpeg", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Large/Item2.png?format=jpg&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Large/Item2.png?format=webp&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" }, { "name": "Small", "formats": [ { "format": "jpg", "size": 0, "mimeType": "image/jpeg", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Small/Item2.png?format=jpg&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/jpeg" } ] }, { "format": "webp", "size": 0, "mimeType": "image/webp", "metadata": { "width": "217", "height": "233" }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/assets/CONTFFFEC388CFD044D8A34D2F8C46EA5786/Small/Item2.png?format=webp&type=responsiveimage", "rel": "self", "method": "GET", "mediaType": "image/webp" } ] } ], "type": "responsiveimage" } ], "mimeType": "image/png", "fileGroup": "Images", "fileType": "png" }, "variations": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/variations", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "versionInfo": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/versionInfo", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "publishInfo": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/publishInfo", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "channels": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/channels", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "publishedChannels": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/publishedChannels", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "collections": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/collections", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "relationships": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/relationships", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "tags": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/tags", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "taxonomies": { "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786/taxonomies", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/metadata-catalog/items/CONTFFFEC388CFD044D8A34D2F8C46EA5786", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" } ] } }
Postman Examples
See Postman Examples in the Get Started section.