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
  • Pricing policy
  • Terraform reference
    • Authentication with the API
      • How to use the API
      • Signing requests
        • All services and methods
          • All methods
          • upload
          • get
          • patch
          • copy
          • getObjectMeta
          • delete
          • deleteMultipleObjects
          • options
          • selectObjectContent
          • putObjectRetention
          • putObjectLegalHold
          • getObjectRetention
          • getObjectLegalHold
          • putObjectTagging
          • getObjectTagging
          • deleteObjectTagging
        • Common request headers
        • Common response headers
        • Responses
  • Monitoring metrics
  • Audit Trails events
  • Bucket logs
  • Release notes
  • FAQ

In this article:

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

patch method

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

Partially updates and appends object data in Yandex Object Storage.

Note

Basic S3 API operations do not include partial object update. This feature is supported for buckets with versioning disabled.

The request includes the updated object range and the new data.

Objects can be updated concurrently with multiple requests.

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

RequestRequest

PATCH /{bucket}/{key} HTTP/2

Path parametersPath parameters

Parameter Description
bucket Bucket name.
key Object key, which is the ID the object is saved with in Object Storage.

HeadersHeaders

Use common headers in your request, as well as the headers below:

Header Description
Content-Range This is a required parameter.
It takes the bytes {<start_byte>}-{<end_byte>}/* value.
Range boundaries are included. The maximum range length is 5 GB.
The Content-Length header must be equal to the Content-Range length.
To append data to an object, specify the end byte value larger than the object size.
The start byte value cannot exceed the object size.
The header format complies with RFC 9110 with the following exceptions:
  • The complete-length header parameter is ignored.
  • The last-pos header parameter is optional.
X-Yc-S3-Patch-Append-Part-Size This is an optional parameter.
It takes the {size_of_new_part} value.
It defines the size (in bytes) of new parts of an object uploaded in parts, if appending to the end of the object.
If the object's last part has reached the specified size, the next append will be saved as a new part.
The default value is 25 MB.
If-Match This is an optional parameter.
It defines the condition for partial object update.
If ETag of an object matches the one specified in the header, the object is updated.
If the condition is not met, Object Storage returns the 412 Precondition Failed error.
You can use it with the If-Unmodified-Since header.
If-Unmodified-Since This is an optional parameter.
It defines the condition for partial object update.
The objest is updated if it has not been modified since the specified time.
If the condition is not met, Object Storage returns the 412 Precondition Failed error.
You can use it with the If-Match header.

ResponseResponse

HeadersHeaders

Responses can only contain common headers.

Response codesResponse codes

For a list of possible responses, see Responses.

In addition, Object Storage can return other errors described in the table below.

Error Description
MissingContentRange The Content-Range header is missing from the request.
MalformedPatchAppendPartSize The X-Yc-S3-Patch-Append-Part-Size header in the request is invalid.
ObjectVersionPatchConflict During the partial update, the object was overwritten with a new version.
ConcurrentUpdatesPatchConflict The conflict could not be resolved due to a high number of concurrent requests.

Data schemaData schema

<?xml version="1.0" encoding="UTF-8"?>
<PatchObjectResult>
    <Object>
    	<LastModified>2023-07-21T11:46:16.357Z</LastModified>
        <ETag>&#34;daebcb5e72f14b690c18018c9f92af05-2&#34;</ETag>
    </Object>
</PatchObjectResult>
Tag Description
PatchObjectResult Root element.
Object Parent tag for update results.
LastModified Date and time when the object was last modified. In case of the partial object update, the tag does not change.
ETag ETag of the updated object. For more details, see common headers.

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
get
Next
copy
Yandex project
© 2025 Yandex.Cloud LLC