-
Couldn't load subscription status.
- Fork 95
Native API
This document outlines the internal API used by Riak CS. Other API options are implemented by using a set of rules to rewrite the requests to conform to this API. That rewritten format that is processed by Webmachine and Riak CS.
There a few reasons for doing this, but the primary reason is that things like subresources complicate the way we have to organize and construct our Webmachine resource modules. It makes writing and maintaining them needlessly complicated. This API suits our needs much better and helps the internals of Riak CS to be decoupled from a particular third-party API.
-
GET ServiceGET /buckets
-
GET BucketGET /buckets/<bucket>/objects
-
HEAD BucketHEAD /buckets/<bucket>
-
PUT BucketPUT /buckets/<bucket>
-
DELETE BucketDELETE /buckets/<bucket>
-
GET Bucket aclGET /buckets/<bucket>/acl
-
PUT Bucket aclPUT /buckets/<bucket>/acl
-
GET Bucket locationGET /buckets/<bucket>/location
-
PUT Bucket locationPUT /buckets/<bucket>/location
-
GET Bucket versioningGET /buckets/<bucket>/versioning
-
PUT Bucket versioningPUT /buckets/<bucket>/versioning
-
GET Bucket policyGET /buckets/<bucket>/policy
-
PUT Bucket policyPUT /buckets/<bucket>/policy
-
DELETE Bucket policyDELETE /buckets/<bucket>/policy
-
List Multipart UploadsGET /buckets/<bucket>/uploads
-
Delete Multiple Objects(This is listed in the S3 docs as an object operation, but it fits better here)POST /buckets/<bucket>/objects
-
GET ObjectGET /buckets/<bucket>/objects/<object>
-
HEAD ObjectHEAD /buckets/<bucket>/objects/<object>
-
PUT ObjectPUT /buckets/<bucket>/objects/<object>
-
DELETE ObjectDELETE /buckets/<bucket>/objects/<object>
-
GET Object aclGET /buckets/<bucket>/objects/<object>/acl
-
PUT Object aclPUT /buckets/<bucket>/objects/<object>/acl
-
Initiate Multipart UploadPOST /buckets/<bucket>/objects/<object>/uploads
-
Upload PartPUT /buckets/<bucket>/objects/<object>/uploads/<upload_id>?partNumber=<part_num>
-
Complete Multipart UploadPOST /buckets/<bucket>/objects/<object>/uploads
-
Upload PartDELETE /buckets/<bucket>/objects/<object>/uploads/<upload_id>
-
List PartsGET /buckets/<bucket>/objects/<object>/uploads/<upload_id>
Object name rewrite involves encoding and decoding to make arbitrary object name URL-safe. No, it used to allow arbitrary names but now it has a guideline to descrive what names are allowed: Object Key and Metadata. Yes, they are pretty unclear about this. As described in CS#1040, especially object name rewrite involves double URL encoding.
quote state RAW escaped(1) escaped(2) example
* 'baz/foo bar' 'baz/foo+bar'
client app +--------+
|
HTTP wire | 'baz/foo%20bar' 'baz/foo%2Bbar'
|
webmachine |
rewrite +------------+
| 'baz%2Ffoo%2520bar' 'baz%2Ffoo%252Bbar'
extract_key +---------------------+
|
v
* 'baz/foo bar' 'baz/foo+bar'