Restore content from AEM
There are times you may want to restore or import content from aem.page or aem.live resources. If you have a list of pages you want to restore, you can simply submit them to Experience Workspace’s import app. If you want a more substantial restore, you can use AEM Admin APIs to get a list of your live content.
Steps
- Get a list of content from AEM.
- Import the list of pages into Experience Workspace.
As with any import, be sure to validate your content after importing.
1. Get a list of content from AEM
cURL (bash)
curl -X POST \
'https://admin.aem.live/status/geometrixx/outdoors/main/index' \
--header 'Accept: */*' \
--header 'X-Auth-Token: {{YOUR_AEM_ADMIN_API_TOKEN}}' \
--header 'Accept-Encoding: gzip' \
--header 'Content-Type: application/json' \
--data-raw '{
"pathsOnly": true,
"select": [
"live"
],
"paths": [
"/*"
]
}'
You can also select "preview" if you would like aem.page content.
This query will return a response with a self property:
JSON (Javascript)
{
"messageId": "87ad2401-b961-417c-84ed-dfd27ec208c0",
"job": {
"topic": "status",
"name": "job-2025-02-14-18-07-24-d8d34679",
},
"links": {
"list": "https://admin.aem.live/job/geometrixx/outdoors/main/status",
"self": "https://admin.aem.live/job/geometrixx/outdoors/main/status/job-2025-02-14-18-07-24-d8d34679"
}
}
Send another request with the self URL and add /details at the end:
cURL (bash)
curl -X GET \
'https://admin.aem.live/job/geometrixx/outdoors/main/status/job-2025-02-14-18-07-24-d8d34679/details' \
--header 'Accept: */*'
It will return all docs, sheets, media, and redirects that are live on your site:
JSON (Javascript)
{
"topic": "status",
"name": "job-2025-02-14-18-07-24-d8d34679",
"state": "stopped",
"createTime": "2025-02-14T18:07:24.178Z",
"data": {
"paths": [
{
"prefix": "/"
}
],
"pathsOnly": true,
"select": [
"preview"
],
"phase": "completed",
"resources": {
"preview": [
"/.da/config.json",
"/home",
"......."
]
}
}
}
Once you have the list (in the preview array in the previous example), you can prefix the paths with your fully-qualified aem.page domain.
2. Import into Experience Workspace
- Go to the import tool at https://da.live/apps/import to import your pages.
- Submit the list of resources you retrieved with your cURL commands in the previous step.
Notes
- The cURL query retrieves docs, sheets, redirects, images, and video.
- Document redirects will be called out as not importable via the redirects import list.
- Media redirects will be followed and imported as the original media name.