Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Object Storage
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Buckets
      • Creating a bucket
      • Deleting a bucket
      • Limiting the maximum size of a bucket
      • Allowing public access to a bucket
      • Bucket encryption
      • Managing object lifecycles
      • Managing CORS configurations
      • Editing a bucket ACL
      • Logging actions with the bucket
    • Objects
      • Uploading an object
      • Getting information about an object
      • Downloading an object
      • Getting a public link to an object
      • Deleting an object
      • Deleting a partially uploaded object
      • Editing an object ACL
    • Static website hosting
      • Hosting setup
      • Support for your own domain
      • Support for multiple domain names
      • Configuring HTTPS
  • Concepts
    • Overview
    • Bucket
    • Objects
    • Bucket versioning
    • Object lifecycles
    • CORS
    • Static website hosting
    • Pre-signed URLs
    • Multipart upload
    • Access control lists (ACLs)
    • Bucket Policy
    • Upload file via HTML form
    • Storage class
    • Logging actions with a bucket
    • Backups
    • TLS protocol
    • Quotas and limits
  • Tools
    • All tools
    • Console clients
      • AWS CLI
      • S3cmd
    • File browsers
      • CyberDuck
      • WinSCP
    • SDK
      • AWS SDK for Java
      • Python SDK (boto)
    • FUSE
      • s3fs
      • goofys
  • Amazon S3-compatible HTTP API
    • How to use the API
    • Signing requests
    • API reference
      • All services and methods
      • Bucket
        • All methods
        • create
        • getBucketEncryption
        • getMeta
        • listObjects
        • listBuckets
        • deleteBucket
        • deleteBucketEncryption
        • putBucketEncryption
        • putBucketVersioning
        • getBucketVersioning
        • putBucketLogging
        • getBucketLogging
        • listObjectVersions
      • Object
        • All methods
        • upload
        • get
        • copy
        • getObjectMeta
        • delete
        • deleteMultipleObjects
        • options
      • Multipart upload
        • General multipart upload procedure
        • startUpload
        • uploadPart
        • copyPart
        • listParts
        • abortUpload
        • completeUpload
        • listUploads
      • Static Website Hosting
        • All methods
        • upload
        • get
        • delete
        • Static website response codes
      • CORS
        • All methods
        • XML structure of CORS configuration
        • upload
        • get
        • delete
      • Lifecycles
        • All methods
        • XML structure of lifecycle configuration
        • upload
        • get
        • delete
      • ACL
        • All methods
        • XML structure of ACL configuration
        • objectGetAcl
        • objectPutAcl
        • bucketGetAcl
        • bucketPutAcl
      • Bucket Policy
        • All methods
        • GetBucketPolicy
        • PutBucketPolicy
        • DeleteBucketPolicy
        • Data schema
        • Actions
        • Conditions
      • Common request headers
      • Common response headers
      • Responses
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
  • Questions and answers
  1. Amazon S3-compatible HTTP API
  2. How to use the API

How to use the API

  • Before you start
  • General API request format
    • Request URL
  • CORS requests

Before you start

To use the API:

  1. Create a service account.
  2. Assign a role to a service account.
  3. Create a static access key.

To access the HTTP API directly, you need static key authentication, which is supported by the tools listed in Supported tools.

For a list of supported Amazon S3 HTTP API methods, see the API reference.

General API request format

{GET|HEAD|PUT|DELETE} /<bucket>/<key> HTTP/1.1
Host: storage.yandexcloud.net
Content-Length: length
Date: date
Authorization: authorization string (AWS Signature Version 4)

Request_body

The name of the bucket can be specified as part of the host name. In this case, the request looks like:

{GET|HEAD|PUT|DELETE} /<key>} HTTP/1.1
Host: <bucket>.storage.yandexcloud.net
...

The set of headers depends on the specific request and is described in the documentation for the corresponding request.

If you use the API directly (without an SDK or apps), you need to generate the Authorization header yourself for authenticating requests. Find out how to do this in the Amazon S3 documentation: Authenticating Requests (AWS Signature Version 4).

Request URL

URLs can taken one of the following forms:

  • https://storage.yandexcloud.net/<bucket>/<key>?<parameters>
  • https://<bucket>.storage.yandexcloud.net/<key>?<parameters>

Note

If you use the SDK for .NET, access the s3.yandexcloud.net host.

CORS requests

Cross-domain requests are available for all API methods used for object management.

To check permissions, CORS sends the options preflight request to a resource. Object Storage allows you to skip the preflight request when sending cross-domain requests to resources. In this case, your request headers must be the same as those in the preflight request.

In this article:
  • Before you start
  • General API request format
  • Request URL
  • CORS requests
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC