Skip to content

Device Media Edit API

Jim Lake edited this page Jul 9, 2025 · 2 revisions

Media Edit endpoints for API usage.

API Endpoint

All calls are made on the standard api endpoint:

https://api-prod.maxloapi.com

Create a new media file

Create a new file in the volume. See File Hashing for details on creating the file_hash correctly.

POST /device/1/media_grant/<media_grant_id>/media

Request Authentication

device_session_key - string - provided in query string or body

Request Path

media_grant_id - number - ID of the media grant.

Request Body

media_path - string - The path for the file.

file_hash - string - The hash of the file.

file_size - number - The size of the file.

ctime - string - The ISO8601 string of the ctime of the file.

mtime - string - The ISO8601 string of the ctime of the file.

Responses

200 OK

media_id - number - Media ID

403 Forbidden

Not logged in

409 Conflict

Already a media object with that media_path. This will rarely happen as we attempt to resolve multiple parallel creates with success on both. Which content wins will depend on exact ordering of requests in the case where 2 clients attempt to create a file at the same path at the same time. The losing client will recieve the data for the current state of the media_path.

media_id - number - ID of the media file.

media_path - string - The path for the file.

file_hash - string - The hash of the file.

file_size - number - The size of the file.

ctime - string - The ISO8601 string of the ctime of the file.

mtime - string - The ISO8601 string of the ctime of the file.

last_updated_user_id - number - ID of the last user to modify the file. May be null.

last_updated_device_id - number - ID of the last user to modify the file. May be null.

last_updated - string - The ISO8601 string of the last modification of the file.

is_deleted - boolean - File deleted flag.

Update a media file

Update an existing media file. Implicitly undeletes the file.

POST /device/1/media_grant/<media_grant_id>/media/<media_id>

Request Authentication

device_session_key - string - provided in query string or body

Request Path

media_grant_id - number - ID of the media grant.

media_id - number - ID of the media file to update.

Request Body

file_hash - string - The hash of the file. file_size - number - The size of the file. ctime - string - The ISO8601 string of the ctime of the file. mtime - string - The ISO8601 string of the ctime of the file.

Responses

200 OK

Media updated successfully

403 Forbidden

Not logged in

Delete a media file

Delete an existing media file.

DELETE /device/1/media_grant/<media_grant_id>/media/<media_id>

Request Authentication

user_session_key - string - provided in query string or body

Request Path

media_grant_id - number - ID of the media grant.

media_id - number - ID of the media file.

Responses

200 OK

Media updated successfully.

403 Forbidden

Not logged in

Clone this wiki locally