The article contains recommendations, reference materials, and resources for developers of Assets as a Cloud Service. It includes new asset upload module, API reference, and information about the support provided in post-processing workflows.
Assets as a Cloud Service provides several APIs to programmatically interact with digital assets. Each API supports specific use cases, as mentioned in the table below. The Assets user interface, Experience Manager desktop app and Adobe Asset Link support all or some of the operations.
Some APIs continue to exist but are not actively supported (denoted with an ×) and must not be used.
Support level | Description |
---|---|
✓ | Supported |
× | Not supported. Do not use. |
- | Not available |
Use case | aem-upload | AEM / Sling / JCR Java APIs | Asset compute service | Assets HTTP API | Sling GET / POST servlets | GraphQL (Preview) |
---|---|---|---|---|---|---|
Original binary | ||||||
Create original | ✓ | × | - | × | × | - |
Read original | - | × | ✓ | ✓ | ✓ | - |
Update original | ✓ | × | ✓ | × | × | - |
Delete original | - | ✓ | - | ✓ | ✓ | - |
Copy original | - | ✓ | - | ✓ | ✓ | - |
Move original | - | ✓ | - | ✓ | ✓ | - |
Metadata | ||||||
Create metadata | - | ✓ | ✓ | ✓ | ✓ | - |
Read metadata | - | ✓ | - | ✓ | ✓ | - |
Update metadata | - | ✓ | ✓ | ✓ | ✓ | - |
Delete metadata | - | ✓ | ✓ | ✓ | ✓ | - |
Copy metadata | - | ✓ | - | ✓ | ✓ | - |
Move metadata | - | ✓ | - | ✓ | ✓ | - |
Content Fragments (CF) | ||||||
Create CF | - | ✓ | - | ✓ | - | - |
Read CF | - | ✓ | - | ✓ | - | ✓ |
Update CF | - | ✓ | - | ✓ | - | - |
Delete CF | - | ✓ | - | ✓ | - | - |
Copy CF | - | ✓ | - | ✓ | - | - |
Move CF | - | ✓ | - | ✓ | - | - |
Versions | ||||||
Create version | ✓ | ✓ | - | - | - | - |
Read version | - | ✓ | - | - | - | - |
Delete version | - | ✓ | - | - | - | - |
Folders | ||||||
Create folder | ✓ | ✓ | - | ✓ | - | - |
Read folder | - | ✓ | - | ✓ | - | - |
Delete folder | ✓ | ✓ | - | ✓ | - | - |
Copy folder | ✓ | ✓ | - | ✓ | - | - |
Move folder | ✓ | ✓ | - | ✓ | - | - |
Experience Manager as a Cloud Service provides a new method to upload assets to the repository. Users can directly upload the assets to the cloud storage using HTTP API. The steps to upload a binary file are:
The approach provides a scalable and more performant handling of asset uploads. The differences as compared to Experience Manager 6.5 are:
See the client code to implement this approach in the open-source aem-upload library.
Submit an HTTP POST request to the desired folder. Assets are created or updated in this folder. Include the selector .initiateUpload.json
to indicate that the request is to initiate upload of a binary file. For example, the path to the folder where the asset should be created is /assets/folder
. The POST request is POST https://[aem_server]:[port]/content/dam/assets/folder.initiateUpload.json
.
The content type of the request body should be application/x-www-form-urlencoded
form data, containing the following fields:
(string) fileName
: Required. The name of the asset as it appears in Experience Manager.(number) fileSize
: Required. The file size, in bytes, of the asset being uploaded.A single request can be used to initiate uploads for multiple binaries, as long as each binary contains the required fields. If successful, the request responds with a 201
status code and a body containing JSON data in the following format:
{
"completeURI": "(string)",
"folderPath": (string)",
"files": [
{
"fileName": "(string)",
"mimeType": "(string)",
"uploadToken": "(string)",
"uploadURIs": [
"(string)"
]
}
]
}
completeURI
(string): Call this URI when the binary finishes uploading. The URI can be an absolute or relative URI, and clients should be able to handle either. That is, the value can be "https://author.acme.com/content/dam.completeUpload.json"
or "/content/dam.completeUpload.json?lang=en"
See complete upload.folderPath
(string): Full path to the folder in which the binary is uploaded.(files)
(array): A list of elements whose length and order match the length and order of the list of binary information provided in the initiate request.fileName
(string): The name of the corresponding binary, as supplied in the initiate request. This value should be included in the complete request.mimeType
(string): The mime type of the corresponding binary, as supplied in the initiate request. This value should be included in the complete request.uploadToken
(string): An upload token for the corresponding binary. This value should be included in the complete request.uploadURIs
(array): A list of strings whose values are full URIs to which the binary’s content should be uploaded (see Upload binary).minPartSize
(number): The minimum length, in bytes, of data that may be provided to any one of the uploadURIs, if there is more than one URI.maxPartSize
(number): The maximum length, in bytes, of data that may be provided to any one of the uploadURIs, if there is more than one URI.The output of initiating an upload includes one or more upload URI values. If more than one URI is provided, the client splits the binary into parts and make POST request of each part to each URI, in order. Use all URIs. Ensure that the size of each part is within the minimum and maximum sizes as specified in the initiate response. CDN edge nodes help accelerate the requested upload of binaries.
A potential method to accomplish this is to calculate the part size based on the number of upload URIs provided by the API. For example, assume the total size of the binary is 20,000 bytes and the number of upload URIs is 2. Then follow these steps:
If the upload is successful, the server responds to each request with a 201
status code.
After all the parts of a binary file are uploaded, submit an HTTP POST request to the complete URI provided by the initiation data. The content type of the request body should be application/x-www-form-urlencoded
form data, containing the following fields.
Fields | Type | Required or not | Description |
---|---|---|---|
fileName |
String | Required | The name of the asset, as was provided by the initiation data. |
mimeType |
String | Required | The HTTP content type of the binary, as was provided by the initiation data. |
uploadToken |
String | Required | Upload token for the binary, as was provided by the initiation data. |
createVersion |
Boolean | Optional | If True and an asset with the specified name exists, then Experience Manager creates a new version of the asset. |
versionLabel |
String | Optional | If a new version is created, the label associated with the new version of an asset . |
versionComment |
String | Optional | If a new version is created, the comments associated with the version. |
replace |
Boolean | Optional | If True and an asset with the specified name exists, Experience Manager deletes the asset then re-create it. |
![NOTE]
If the asset exists and neither
createVersion
norreplace
is specified, then Experience Manager updates the asset’s current version with the new binary.
Like the initiate process, the complete request data may contain information for more than one file.
The process of uploading a binary is not done until the complete URL is invoked for the file. An asset is processed after the upload process is complete. Processing does not start even if the asset’s binary file is uploaded completely but upload process is not completed.
If successful, the server responds with a 200
status code.
To learn more about the upload algorithms or to build your own upload scripts and tools, Adobe provides open-source libraries and tools:
The new upload method is supported only for Adobe Experience Manager as a Cloud Service. The APIs from Adobe Experience Manager 6.5 are deprecated. The methods related to upload or update assets or renditions (any binary upload) are deprecated in the following APIs:
AssetManager
Java API, like AssetManager.createAsset(..)
In Experience Manager, the asset processing is based on Processing Profiles configuration that uses asset microservices. Processing does not require developer extensions.
For post-processing workflow configuration, use the standard workflows with extensions with custom steps.
Customers upgrading from previous versions of Experience Manager can use asset microservices to process assets. The cloud-native asset microservices are much simpler to configure and use. A few workflow steps used in the DAM Update Asset workflow in the previous version are not supported.
Experience Manager as a Cloud Service support the following workflow steps:
com.day.cq.dam.similaritysearch.internal.workflow.process.AutoTagAssetProcess
com.day.cq.dam.core.impl.process.CreateAssetLanguageCopyProcess
com.day.cq.wcm.workflow.process.CreateVersionProcess
com.day.cq.dam.similaritysearch.internal.workflow.smarttags.StartTrainingProcess
com.day.cq.dam.similaritysearch.internal.workflow.smarttags.TransferTrainingDataProcess
com.day.cq.dam.core.impl.process.TranslateAssetLanguageCopyProcess
com.day.cq.dam.core.impl.process.UpdateAssetLanguageCopyProcess
com.adobe.cq.workflow.replication.impl.ReplicationWorkflowProcess
com.day.cq.dam.core.impl.process.DamUpdateAssetWorkflowCompletedProcess
The following technical workflow models are either replaced by asset microservices or the support is not available:
com.day.cq.dam.core.impl.process.DamMetadataWritebackWorkflowCompletedProcess
com.day.cq.dam.core.process.DeleteImagePreviewProcess
com.day.cq.dam.s7dam.common.process.DMEncodeVideoWorkflowCompletedProcess
com.day.cq.dam.core.process.GateKeeperProcess
com.day.cq.dam.core.process.AssetOffloadingProcess
com.day.cq.dam.core.process.MetadataProcessorProcess
com.day.cq.dam.core.process.XMPWritebackProcess
com.adobe.cq.dam.dm.process.workflow.DMImageProcess
com.day.cq.dam.s7dam.common.process.S7VideoThumbnailProcess
com.day.cq.dam.scene7.impl.process.Scene7UploadProcess
com.day.cq.dam.s7dam.common.process.VideoProxyServiceProcess
com.day.cq.dam.s7dam.common.process.VideoThumbnailDownloadProcess
com.day.cq.dam.s7dam.common.process.VideoUserUploadedThumbnailProcess
com.day.cq.dam.core.process.CreatePdfPreviewProcess
com.day.cq.dam.core.process.CreateWebEnabledImageProcess
com.day.cq.dam.video.FFMpegThumbnailProcess
com.day.cq.dam.core.process.ThumbnailProcess
com.day.cq.dam.cameraraw.process.CameraRawHandlingProcess
com.day.cq.dam.core.process.CommandLineProcess
com.day.cq.dam.pdfrasterizer.process.PdfRasterizerHandlingProcess
com.day.cq.dam.core.process.AddPropertyWorkflowProcess
com.day.cq.dam.core.process.CreateSubAssetsProcess
com.day.cq.dam.core.process.DownloadAssetProcess
com.day.cq.dam.word.process.ExtractImagesProcess
com.day.cq.dam.word.process.ExtractPlainProcess
com.day.cq.dam.video.FFMpegTranscodeProcess
com.day.cq.dam.ids.impl.process.IDSJobProcess
com.day.cq.dam.indd.process.INDDMediaExtractProcess
com.day.cq.dam.indd.process.INDDPageExtractProcess
com.day.cq.dam.core.impl.lightbox.LightboxUpdateAssetProcess
com.day.cq.dam.pim.impl.sourcing.upload.process.ProductAssetsUploadProcess
com.day.cq.dam.core.process.ScheduledPublishBPProcess
com.day.cq.dam.core.process.ScheduledUnPublishBPProcess
com.day.cq.dam.core.process.SendDownloadAssetEmailProcess
com.day.cq.dam.core.impl.process.SendTransientWorkflowCompletedEmailProcess