API to start bulk processing for assets
A POST method that initiates bulk asset processing for a specified path. This API supports both JCR-based and database-based asset processing. It starts an asynchronous job that processes all assets under the given path and its sub-paths. Upon initiation, the API returns a unique processingID, which can be used to track the job status.
Request URL
http://<aem-guides-server>:<port-number>/bin/guides/v1/assets/process
Request Parameters
pathexcludedPathstypeRequest Example
{
"path": "/content/dam/status-fetch1",
"excludedPaths": [
"content/dam/status-fetch1/excluded-folder"
],
"type": "ASSET_PROCESSING"
}
Response values
processingId to poll over to get the status of async job.
{
"processingId": "akjhdfalkj1132"
}
Response Codes
- 200 Success
- 400 Invalid input
- 401 Unauthorized access
- 500 internal server error
Check job status
A GET method that retrieves the current status of a previously started asset processing job.
Request URL
http://<aem-guides-server>:<port-number>/bin/guides/v1/assets/process/status
Request Parameters
processingIdResponse Example
{
"processingId": "string",
"path": "string",
"excludedPaths": ["string"],
"status": "WAITING",
"triggeredCount": 0,
"startedAt": 0,
"completedAt": 0,
"hasLogs": true,
"createdBy": "string",
"type": "ASSET_PROCESSING",
"migrationSet": {
"totalFiles": 0,
"calculationStatus": "WAITING"
},
"eta": {
"value": 0,
"unit": "string"
},
"comments": "string",
"restartable": true,
"resumable": true,
"cancellable": true
}
Response Codes
- 200 Success
- 400 Invalid input
- 401 Unauthorized access
- 500 internal server error
View job logs
A GET method that retrieves logs for a given job ID. This API fetches the logs of the asset processing job. The processingid is mandatory. The API provides offset and limit parameters, as well as a tailing strategy.
Request URL
http://<aem-guides-server>:<port-number>/bin/guides/v1/assets/process/logs
Request Parameters
processingIdoffsetlimittailResponse Example
{
"lines": [
"string"
],
"limit": 0,
"offset": 0,
"hasMore": true
}
Response Codes
- 200 Success
- 400 Invalid input
- 401 Unauthorized access
- 500 Internal server error
Download job logs
A GET method that downloads the log file for a given job as a ZIP.
Request URL
http://<aem-guides-server>:<port-number>/bin/guides/v1/assets/process/logs/download
Request Parameters
processingIdResponse Example
{
"logFilePaths": [
"string"
]
}
Response Codes
- 400 Invalid input
- 401 Unauthorized access
- 500 Internal server error
Cancel job
A POST API that cancels an ongoing bulk asset processing request. If the job is not found, the API returns an error.
Request URL
http://<aem-guides-server>:<port-number>/bin/guides/v1/assets/process/cancel
Request Parameters
processingIdResponse Codes
- 200 Success
- 400 Invalid input
- 401 Unauthorized access
- 500 Internal server error
Resume job
A POST API that restarts a previously cancelled or failed bulk asset processing request. It resumes processing from the last checkpoint. If the job is not found or is currently running, the API returns an error.
Request URL
http://<aem-guides-server>:<port-number>/bin/guides/v1/assets/process/resume
Request Parameters
processingIdResponse Codes
- 200 Success
- 400 Invalid input
- 401 Unauthorized access
- 500 Internal server error
View job history
A GET API that returns the last āNā executions of Asset Post-Processing.
Request URL
http://<aem-guides-server>:<port-number>/bin/guides/v1/assets/process/history
Request Parameters
None. This GET request retrieves job history without requiring input parameters.
Response Example
{
"executionHistory": [
{
"processingId": "165f1de6-68c4-4dcd-9223-2b7242b62306",
"path": "/content/dam/22858",
"status": "SUCCESS",
"triggeredCount": 6,
"startedAt": 1761291362776,
"completedAt": 1761291364026,
"hasLogs": true,
"createdBy": "user",
"type": "ASSET_PROCESSING",
"migrationSet": {
"totalFiles": 6,
"calculationStatus": "SUCCESS"
},
"eta": {
"value": 0,
"unit": "SECONDS"
},
"comments": "",
"filter": {
"fileTypes": [],
"filterProcessedAssets": false
},
"cancellable": false,
"resumable": false,
"restartable": true
}
]
}