Skip to content

Device Multipart Upload API

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

Device Multipart Upload endpoints for API usage.

API Endpoint

All calls are made on the standard api endpoint:

https://api-prod.maxloapi.com

Start Multipart Upload

Initiates a multipart upload process, returning necessary information to upload file parts.

POST /device/1/media_grant/:media_grant_id/multipart

Request Authentication

device_session_key - string - provided in query string or body

Request Path

media_grant_id - string - The media grant ID.

Request Body

file_size - number - The total size of the file to be uploaded.

file_hash - string - The hash of the file.

part_list - array of object - An array of objects, each describing a part of the file.

  • part_num - number - The part number.

  • part_size - number - The size of the part.

  • part_hash - string - The hash of the part.

Responses

200 OK

upload_id - string - The ID for the multipart upload. signed_url_list - array of object - An array of signed URLs for uploading each part.

  • part_num - number - The part number.

  • url - string - The signed URL for uploading the part.

    400 Bad Request

Missing or invalid parameters.

409 Conflict

skip_upload: true - The file already exists and does not need to be uploaded. no_active_file: true - No active file found for the given hash.

Complete Multipart Upload

Finalizes a multipart upload after all parts have been uploaded.

POST /device/1/media_grant/:media_grant_id/multipart_complete

Request Authentication

device_session_key - string - provided in query string or body

Request Path

media_grant_id - string - The media grant ID.

Request Body

file_size - number - The total size of the file.

file_hash - string - The hash of the file.

s3_bucket_id - number - The ID of the S3 bucket where the object was uploaded.

upload_id - string - The upload ID obtained from the Start Multipart Upload endpoint.

part_list - array of object - An array of objects, each describing a part of the file.

  • part_num - number - The part number.

  • etag - string - The ETag of the uploaded part.

Responses

201 Created

Multipart upload completed successfully.

400 Bad Request

Missing or invalid parameters.

404 Not Found

Upload ID not found.

412 Precondition Failed

not_finished - Not all parts have been uploaded or the upload is not in a complete state.

Clone this wiki locally