-
Notifications
You must be signed in to change notification settings - Fork 0
Media Edit
Media Edit endpoints for API usage.
All calls are made on the standard api endpoint:
https://api-prod.maxloapi.com
Create a new file in the volume. See File Hashing for details on creating the file_hash correctly.
POST /api/1/media
user_session_key - string - provided in query string or body
volume_id - number - Volume to contain the new 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.
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.
Update an existing media file. Implicitly undeletes the file.
POST /api/1/media/<media_id>
user_session_key - string - provided in query string or body
media_id - number - ID of the media file.
volume_id - number - Volume to containing the 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.
200 OK
Media updated successfully
403 Forbidden
Not logged in
Delete an existing media file.
DELETE /api/1/media/<media_id>
user_session_key - string - provided in query string or body
media_id - number - ID of the media file.
volume_id - number - Volume to containing the file.
200 OK
Media updated successfully.
403 Forbidden
Not logged in
Undelete an existing media file. Does not modify any other properties.
POST /api/1/media/<media_id>/undelete
user_session_key - string - provided in query string or body
media_id - number - ID of the media file.
volume_id - number - Volume to containing the file.
200 OK
Media updated successfully.
403 Forbidden
Not logged in