curl -X POST https://app.drime.cloud/api/v1/file-entries/485529678/metadata \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lastModified": 1712345678000
}'
const entryId = 485529678;
// Preserve the file original mtime after upload
const response = await fetch(
`https://app.drime.cloud/api/v1/file-entries/${entryId}/metadata`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
lastModified: file.lastModified // ms epoch from the File API
})
}
);
const { updated } = await response.json();
import os
import requests
entry_id = 485529678
path = '/path/to/local/file.pdf'
# os.path.getmtime returns seconds - convert to milliseconds
mtime_ms = int(os.path.getmtime(path) * 1000)
response = requests.post(
f'https://app.drime.cloud/api/v1/file-entries/{entry_id}/metadata',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={'lastModified': mtime_ms}
)
print(response.json()) # {'status': 'success', 'updated': True}
{
"status": "success",
"updated": true
}
{
"status": "error",
"message": "No metadata provided"
}
{
"message": "No query results for model [FileEntry] 999999999"
}
Files & Folders
Set File Metadata
Set the original modification time (SetModTime), EXIF data or Live Photo link of a file
POST
/
file-entries
/
{entryId}
/
metadata
curl -X POST https://app.drime.cloud/api/v1/file-entries/485529678/metadata \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lastModified": 1712345678000
}'
const entryId = 485529678;
// Preserve the file original mtime after upload
const response = await fetch(
`https://app.drime.cloud/api/v1/file-entries/${entryId}/metadata`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
lastModified: file.lastModified // ms epoch from the File API
})
}
);
const { updated } = await response.json();
import os
import requests
entry_id = 485529678
path = '/path/to/local/file.pdf'
# os.path.getmtime returns seconds - convert to milliseconds
mtime_ms = int(os.path.getmtime(path) * 1000)
response = requests.post(
f'https://app.drime.cloud/api/v1/file-entries/{entry_id}/metadata',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={'lastModified': mtime_ms}
)
print(response.json()) # {'status': 'success', 'updated': True}
{
"status": "success",
"updated": true
}
{
"status": "error",
"message": "No metadata provided"
}
{
"message": "No query results for model [FileEntry] 999999999"
}
Overview
Updates metadata on an existing file without re-uploading its content. This is the endpoint to use when you need to:- Preserve the original modification time of a file after upload (equivalent to rclone’s
SetModTime) - Attach or merge EXIF data after the file content has been uploaded
- Link an iOS Live Photo to its video counterpart
At least one of
lastModified or exifData must be provided, otherwise the request fails with a 422 error.Path Parameters
integer
required
The numeric file entry ID. Entry hashes are not accepted on this endpoint.
Request Body
integer
Original client-side modification time as a Unix epoch in milliseconds (e.g.
1712345678000).
Stored in the entry’s client_last_modified field and merged into its EXIF data.Milliseconds, not seconds.
1712345678 (seconds) would be interpreted as January 1970.string | object
EXIF metadata to merge into the entry. Accepts either:
- A base64-encoded JSON string
- A raw JSON string
- A plain JSON object
captured_at (used by the photo timeline) is updated too.string
Apple Live Photo content identifier. Only stored if the entry does not already have one.
Response
string
Request status (
success)boolean
true when the metadata was storedcurl -X POST https://app.drime.cloud/api/v1/file-entries/485529678/metadata \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lastModified": 1712345678000
}'
const entryId = 485529678;
// Preserve the file original mtime after upload
const response = await fetch(
`https://app.drime.cloud/api/v1/file-entries/${entryId}/metadata`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
lastModified: file.lastModified // ms epoch from the File API
})
}
);
const { updated } = await response.json();
import os
import requests
entry_id = 485529678
path = '/path/to/local/file.pdf'
# os.path.getmtime returns seconds - convert to milliseconds
mtime_ms = int(os.path.getmtime(path) * 1000)
response = requests.post(
f'https://app.drime.cloud/api/v1/file-entries/{entry_id}/metadata',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
json={'lastModified': mtime_ms}
)
print(response.json()) # {'status': 'success', 'updated': True}
{
"status": "success",
"updated": true
}
{
"status": "error",
"message": "No metadata provided"
}
{
"message": "No query results for model [FileEntry] 999999999"
}
You can also set
lastModified directly at upload time by including it in the
Upload File or Create S3 Entry
request body. Use this endpoint when the file already exists, or to fix timestamps after the fact.