Referensi API Kompatibel S3
Ikhtisar
Memesplora menyediakan API yang kompatibel dengan AWS S3, memungkinkan penggunaan klien kompatibel S3 apa pun (seperti rclone, AWS CLI, MinIO Client) untuk mengakses ruang penyimpanan secara langsung.
Endpoint
Alamat S3 API: http://localhost:5213
Otentikasi
Menggunakan algoritma tanda tangan AWS Signature V4. Access Key dan Secret Key diperoleh dari antarmuka manajemen web.
API yang Didukung
Operasi Bucket
| Operasi | HTTP | Jalur |
|---|---|---|
| ListBuckets | GET | / |
| HeadBucket | HEAD | /{bucket} |
Operasi Objek
| Operasi | HTTP | Jalur |
|---|---|---|
| GetObject | GET | /{bucket}/{key} |
| PutObject | PUT | /{bucket}/{key} |
| DeleteObject | DELETE | /{bucket}/{key} |
| HeadObject | HEAD | /{bucket}/{key} |
| ListObjects | GET | /{bucket} |
| ListObjectsV2 | GET | /{bucket}?list-type=2 |
| DeleteObjects | POST | /{bucket}?delete |
| CopyObject | PUT | /{bucket}/{key} (x-amz-copy-source) |
Unggahan Multi-Bagian
| Operasi | HTTP | Jalur |
|---|---|---|
| CreateMultipartUpload | POST | /{bucket}/{key}?uploads |
| UploadPart | PUT | /{bucket}/{key}?partNumber=&uploadId= |
| CompleteMultipartUpload | POST | /{bucket}/{key}?uploadId= |
| AbortMultipartUpload | DELETE | /{bucket}/{key}?uploadId= |
| ListParts | GET | /{bucket}/{key}?uploadId= |
Contoh Penggunaan
AWS CLI
bash
aws configure --profile memesplora
aws s3 --endpoint-url http://localhost:5213 ls
aws s3 --endpoint-url http://localhost:5213 cp file.txt s3://my-space/
aws s3 --endpoint-url http://localhost:5213 ls s3://my-space/rclone
bash
rclone config # Pilih S3 Compatible
rclone copy file.txt memesplora:my-space/
rclone ls memesplora:my-space/Detail Arsitektur
Lihat Arsitektur Protokol S3 untuk memahami desain detail.