Petabox
  • Introduction
  • Petabox FAQ
  • Concepts
    • Bucket versioning
    • Logging actions with a bucket
    • Object Lock
  • Tools
    • Supported tools
      • CyberDuck S3 Client
      • Mountain Duck
      • S3 Browser
      • RClone
      • AWS CLI Console client
      • SDKs for different languages
        • JavaScript SDK
        • AWS SDK for Java
        • Python SDK (boto)
  • S3 Compatible API
    • How to use the API
    • Signing Requests
    • API Reference
      • Bucket
        • HeadBucket
        • ListObjects/ListObjectsV2
        • PutBucketVersioning
        • PutBucketLogging
        • ListBuckets
        • RenameBucket
        • GetBucketLocation
      • Object
        • PutObject
        • GetObject
        • HeadObject
        • RenameObject
        • PutObjectAcl
      • Multipart upload
        • General multipart upload order
        • CreateMultipartUpload
        • UploadPart
        • CompleteMultipartUpload
        • ListMultipartUploads
      • Analytics
        • GetStatistics
        • GetBandwidthAnalytics
        • GetStorageAnalytics
      • Common request headers
      • Common response headers
      • Responses
      • GetObjectTagging
      • GetObjectAcl
      • GetBucketAcl
      • ListObjectVersions
      • GetBucketRequestPayment
      • GetBucketReplication
      • GetBucketTagging
      • GetBucketLocation
      • GetBucketVersioning
      • GetBucketLifecycle
      • GetObjectLockConfiguration
      • PutObjectLockConfiguration
      • GetObjectRetention
      • GetObjectLegalHold
      • PutObjectRetention
      • PutObjectLegalHold
      • PutObjectAcl
      • PutBucketAcl
      • PutBucketVersioning
      • CopyObject
      • DeleteObjects
      • AbortMultipartUpload
      • DeleteObject
      • DeleteBucket
      • PutBucketTagging
      • PutObjectTagging
      • DeleteBucketTagging
      • DeleteObjectTagging
      • PutBucketLogging
      • GetBucketLogging
      • ListParts
      • UploadPartCopy
      • PutBucketPolicy
      • GetBucketPolicy
      • DeleteBucketPolicy
Powered by GitBook
On this page
  • Preparation for work
  • General view of the API request
  1. S3 Compatible API

How to use the API

PreviousPython SDK (boto)NextSigning Requests

Last updated 3 years ago

Preparation for work

To use the API, you need to get an access key id and secret key.

Static key authorization is required to access the HTTP API directly and is supported by the tools listed in the section .

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

General view of the API request

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

Request_body

The bucket name can be specified as part of the hostname. In this case, the request will take the form:

{GET|HEAD|PUT|DELETE|MOVE} /<key>} HTTP/1.1
Host: <bucket>.s3.petabox.io
...

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 SDK and applications), then you will have to generate the header yourself to sign the requests Authorization. For information on how to do this, see the section of the Amazon S3 documentation.

Request URL

The URL can take one of the following forms:

  • https://s3.petabox.io/<bucket>/<key>?<parameters>

  • https://<bucket>.s3.petabox.io/<key>?<parameters>

Supported Tools
API Reference
Authenticating Requests (AWS Signature Version 4)