Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Object Storage
  • Terraform reference
    • Authentication with the API
      • How to use the API
      • Signing requests
        • All services and methods
          • General multipart upload procedure
          • startUpload
          • uploadPart
          • copyPart
          • listParts
          • abortUpload
          • completeUpload
          • listUploads
        • Common request headers
        • Common response headers
        • Responses
  • Monitoring metrics
  • Audit Trails events
  • Bucket logs
  • Release notes
  • FAQ

In this article:

  • Request
  • Path parameters
  • Request parameters
  • Headers
  • Data schema
  • Response
  • Headers
  • Response codes
  • Data schema
  1. API reference
  2. REST (Amazon S3-compatible)
  3. REST
  4. Multipart upload
  5. completeUpload

completeUpload method

Written by
Yandex Cloud
Updated at March 19, 2025
  • Request
    • Path parameters
    • Request parameters
    • Headers
    • Data schema
  • Response
    • Headers
    • Response codes
    • Data schema

This request completes a multipart upload.

After receiving the request Object Storage:

  • Assembles the object from parts of the upload in ascending order by part number.
  • Deletes the upload ID, which means that any subsequent requests with that ID will return the NoSuchUpload error.

When completing the upload, you must provide the list of the parts. The description of each part must contain an ETag value that is returned after that part was uploaded. See uploadPart method.

The operation may take several minutes depending on the object size and the number of parts.

If the request failed, the client app should be prepaired to retry the request.

For more information on getting started with the API and the general request format, see How to use the S3 API.

RequestRequest

POST /{bucket}/{key}?uploadId=UploadId HTTP/2

Path parametersPath parameters

Parameter Description
bucket Bucket name.
key Object key.

Request parametersRequest parameters

Parameter Description
uploadId ID of the multipart upload returned by Object Storage at startup.

HeadersHeaders

Use the appropriate common headers in your request.

Data schemaData schema

The list of parts of a multipart upload is provided as an XML file in the following format:

<CompleteMultipartUpload>
  <Part>
    <PartNumber>PartNumber</PartNumber>
    <ETag>ETag</ETag>
  </Part>
  ...
</CompleteMultipartUpload>
Tag Description
CompleteMultipartUpload Request data.

Path: /CompleteMultipartUpload.
Part Data on the object uploaded part.

Path: /CompleteMultipartUpload/Part.
PartNumber Part number.

It is a unique ID that determines the part position among other parts in the upload.

Path: /CompleteMultipartUpload/Part/PartNumber.
ETag ID that Object Storage returns after the part is uploaded.

Path: /CompleteMultipartUpload/Part/ETag.

ResponseResponse

HeadersHeaders

Responses can only contain common headers.

Response codesResponse codes

For a list of possible responses, see Responses.

Additionally, Object Storage may return errors described in the table below.

Error Description HTTP code
NoSuchUpload The specified upload does not exist. This may happen if you specify a wrong upload ID or the upload was completed or deleted. 404 Not Found
InvalidPart Some of the specified parts were not found.

Possible causes:
- The parts have not been uploaded.
- The provided ETag does not match the saved one.
400 Bad Request
InvalidPartOrder The list of parts was not provided in ascending order.

The list must be sorted by part number in ascending order.
400 Bad Request

A successful response contains additional data in XML format with the schema described below.

Data schemaData schema

<CompleteMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Location>http://Example-Bucket.storage.yandexcloud.net/Example-Object</Location>
  <Bucket>Example-Bucket</Bucket>
  <Key>Example-Object</Key>
  <ETag>"3858f62230ac3c915f300c664312c11f-9"</ETag>
</CompleteMultipartUploadResult>
Tag Description
CompleteMultipartUploadResult Response data.

Path: /CompleteMultipartUploadResult.
Location URI of the object created as a result of uploading.

Path: /CompleteMultipartUploadResult/Location.
Bucket Name of the bucket that contains the object.

Path: /CompleteMultipartUploadResult/Bucket.
Key Key of the created object.

Path: /CompleteMultipartUploadResult/Key.
ETag Object hash.

ETag may or may not be MD5.

Path: /CompleteMultipartUploadResult/ETag.

See alsoSee also

  • Debugging requests using the AWS CLI
  • Example of sending a signed request using curl
  • Code example for generating a signature

Was the article helpful?

Previous
abortUpload
Next
listUploads
Yandex project
© 2025 Yandex.Cloud LLC