Move
The Move API allows you to move or rename files within the same repository. Move is a destructive operation - the source file is removed after the move.
POST
Parameters
Headers
https://main--docket--da-pilot.aem.live/fragments/api/headers
Path
https://main--docket--da-pilot.aem.page/fragments/api/path
Body
Content-Type: multipart/form-data
destination(required) - The destination path where the file will be moved
Examples
Rename a File
- curl (bash)
- Javascript
curl -X POST \
'https://admin.da.live/move/geometrixx/outdoors/drafts/cmillar/article.html' \
--header 'Authorization: Bearer {IMS_TOKEN}' \
--form 'destination=/drafts/cmillar/article-v2.html'
async function renameFile(org, repo, sourcePath, newName) {
const formData = new FormData();
formData.append('destination', newName);
const response = await fetch(
`https://admin.da.live/move/${org}/${repo}${sourcePath}`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${IMS_TOKEN}`
},
body: formData
}
);
if (response.status === 401) {
throw new Error('Authentication failed');
}
if (response.status === 400) {
const error = await response.json();
throw new Error(error.error || 'Bad request');
}
if (response.status === 204) {
return { success: true, moved: true };
}
throw new Error(`Unexpected status: ${response.status}`);
}
// Usage - rename file in same directory
await renameFile(
'geometrixx',
'outdoors',
'/drafts/cmillar/article.html',
'/drafts/cmillar/article-v2.html'
);
Move File to Different Directory
- curl (bash)
- Javascript
curl -X POST \
'https://admin.da.live/move/geometrixx/outdoors/drafts/cmillar/article.html' \
--header 'Authorization: Bearer {IMS_TOKEN}' \
--form 'destination=/archive/2026/article.html'
async function moveFile(org, repo, sourcePath, destinationPath) {
const formData = new FormData();
formData.append('destination', destinationPath);
const response = await fetch(
`https://admin.da.live/move/${org}/${repo}${sourcePath}`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${IMS_TOKEN}`
},
body: formData
}
);
if (response.status === 204) {
return { success: true };
}
throw new Error(`Move failed: ${response.status}`);
}
// Usage - move file to different directory
await moveFile(
'geometrixx',
'outdoors',
'/drafts/cmillar/article.html',
'/archive/2026/article.html'
);
Move Different File Types
- curl (bash)
# Move HTML file
curl -X POST \
'https://admin.da.live/move/geometrixx/outdoors/drafts/article.html' \
--header 'Authorization: Bearer {IMS_TOKEN}' \
--form 'destination=/archive/article.html'
# Move JSON file
curl -X POST \
'https://admin.da.live/move/geometrixx/outdoors/data/config.json' \
--header 'Authorization: Bearer {IMS_TOKEN}' \
--form 'destination=/data/backup/config.json'
# Move image
curl -X POST \
'https://admin.da.live/move/geometrixx/outdoors/media/hero.png' \
--header 'Authorization: Bearer {IMS_TOKEN}' \
--form 'destination=/media/archive/hero.png'
# Move PDF
curl -X POST \
'https://admin.da.live/move/geometrixx/outdoors/docs/guide.pdf' \
--header 'Authorization: Bearer {IMS_TOKEN}' \
--form 'destination=/docs/archive/guide.pdf'
# Move SVG
curl -X POST \
'https://admin.da.live/move/geometrixx/outdoors/assets/logo.svg' \
--header 'Authorization: Bearer {IMS_TOKEN}' \
--form 'destination=/assets/old/logo.svg'
Response
- 204 (markup)
Empty response body
HTTP 204 No Content indicates successful move
Source file is removed after move
Behavior Notes:
- Move is DESTRUCTIVE - source file is removed after successful move
- Returns 204 even if source file doesn't exist (no validation)
- Silently overwrites if destination already exists (no confirmation)
- No response body - no way to confirm the move actually happened
- Folder paths return 204 but do NOT move folder contents
Error Responses:
- 400 Bad Request - Missing
destinationparameter returns{"error":"No destination provided."} - 401 Unauthorized - Invalid or missing authentication token (empty body)