Interact with Akamai Cloud Object Storage using the Ceph REST API

Akamai Cloud Object Storage is an S3-compatible service and, as such, it allows applications to talk “S3” using the Ceph Object Gateway S3 API. This means compatibility with a large subset of the Amazon S3 REST API.

The API is divided into three groups, which go into a lower level each:

  1. Service operations
  2. Bucket operations
  3. Object operations

Working with the API

The steps for interacting with the API using your preferred REST client may vary. Here, I’ll describe how to do it using Postman. 

We’ll use AWS Signature to authenticate our REST requests, which requires an access key with permissions to interact with the clusters you choose. 

Next, from the “Supported endpoint types by region” section, take the S3 hostname value that matches your selection; it’s in the format {{objcluster}}.linodeobjects.com, where {{objcluster} is something like us-lax-1 or fr-par-13. You’ll be using something like this as the base URL for the endpoint. 

https://{{objcluster}}.linodeobjects.com

Now, here’s the list of operations you can execute against Akamai Cloud OBJ, with links to their specific docs for more information. 

CategoryOperationSyntaxDocumentation
ServiceList BucketsGET / https://docs.ceph.com/en/latest/radosgw/s3/serviceops/#list-buckets
BucketCreate BucketPUT /{bucket}https://docs.ceph.com/en/latest/radosgw/s3/bucketops/#put-bucket
BucketDelete BucketDELETE /{bucket}https://docs.ceph.com/en/latest/radosgw/s3/bucketops/#delete-bucket
BucketList Bucket ObjectsGET /{bucket}https://docs.ceph.com/en/latest/radosgw/s3/bucketops/#get-bucket
BucketGet Bucket LocationGET /{bucket}?locationhttps://docs.ceph.com/en/latest/radosgw/s3/bucketops/#get-bucket-location
BucketGet Bucket ACLGET /{bucket}?aclhttps://docs.ceph.com/en/latest/radosgw/s3/bucketops/#get-bucket-acl
BucketPUT Bucket ACLPUT /{bucket}?aclhttps://docs.ceph.com/en/latest/radosgw/s3/bucketops/#put-bucket-acl
BucketList Bucket Multipart UploadsGET /{bucket}?uploadshttps://docs.ceph.com/en/latest/radosgw/s3/bucketops/#list-bucket-multipart-uploads
BucketToggle Bucket VersioningPUT /{bucket}?versioninghttps://docs.ceph.com/en/latest/radosgw/s3/bucketops/#enablesuspend-bucket-versioning
BucketPlace Object LockPUT /{bucket}?object-lockhttps://docs.ceph.com/en/latest/radosgw/s3/bucketops/#put-bucket-object-lock
BucketGet Object LockGET /{bucket}?object-lockhttps://docs.ceph.com/en/latest/radosgw/s3/bucketops/#get-bucket-object-lock
ObjectUpload ObjectPUT /{bucket}/{object}https://docs.ceph.com/en/latest/radosgw/s3/objectops/#put-object
ObjectCopy ObjectPUT /{dest-bucket}/{dest-object}https://docs.ceph.com/en/latest/radosgw/s3/objectops/#copy-object
ObjectRemove ObjectDELETE /{bucket}/{object}https://docs.ceph.com/en/latest/radosgw/s3/objectops/#remove-object
ObjectGet ObjectGET /{bucket}/{object}https://docs.ceph.com/en/latest/radosgw/s3/objectops/#get-object
ObjectGet Object InfoHEAD /{bucket}/{object}https://docs.ceph.com/en/latest/radosgw/s3/objectops/#get-object-info
ObjectGet Object ACLGET /{bucket}/{object}?aclhttps://docs.ceph.com/en/latest/radosgw/s3/objectops/#get-object-acl
ObjectSet Object ACLPUT /{bucket}/{object}?aclhttps://docs.ceph.com/en/latest/radosgw/s3/objectops/#set-object-acl
ObjectInitiate Multi-part UploadPOST /{bucket}/{object}?uploadshttps://docs.ceph.com/en/latest/radosgw/s3/objectops/#initiate-multi-part-upload
ObjectMultipart Upload PartPUT /{bucket}/{object}?partNumber=&uploadId=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#multipart-upload-part
ObjectList Multipart Upload PartsGET /{bucket}/{object}?uploadId=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#list-multipart-upload-parts
ObjectComplete Multipart UploadPOST /{bucket}/{object}?uploadId=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#complete-multipart-upload
ObjectAbort Multipart UploadDELETE /{bucket}/{object}?uploadId=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#abort-multipart-upload
ObjectAppend ObjectPUT /{bucket}/{object}?append&position=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#append-object
ObjectPut Object RetentionPUT /{bucket}/{object}?retention&versionId=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#put-object-retention
ObjectGet Object RetentionGET /{bucket}/{object}?retention&versionId=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#get-object-retention
ObjectPut Object Legal HoldPUT /{bucket}/{object}?legal-hold&versionId=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#put-object-legal-hold
ObjectGet Object Legal HoldGET /{bucket}/{object}?legal-hold&versionId=https://docs.ceph.com/en/latest/radosgw/s3/objectops/#get-object-legal-hold

As you can see, this list includes the (large) subset of operations compatible with Akamai Cloud Object Storage, plus a few that are specific to AWS S3 and aren’t supported. Keep in mind that there are also differences in E0/E1 and E2/E3 endpoints; for example, object-level ACLs are only supported on the former. 

Final remarks

S3 compatibility means the client can speak “S3” with the API, but caveats apply to multiple operations. It’s important to validate each scenario to determine whether it’s fully compatible or needs adjustments, but this description can help with much of the initial heavy lifting when interacting with Object Storage via Ceph Object Gateway.

Have fun!

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Posts