Easy URL
Definitions
“Easy URL” is a user-friendly mapping of AIS native APIs:
- GET(object)
- PUT(object)
- list-objects(bucket)
- list-buckets
The feature is intended to enable (convenient) usage of your Internet Browser (or curl, etc. tools) to run commands that look as follows:
- GET http(s)://host:port/provider/[bucket[/object]]
- PUT http(s)://host:port/provider/[bucket[/object]],
where:
hostandportare, as usual, the hostname and listening port of any available AIS gateway (aka “proxy”);provideris one of: (gs|az|ais), where the first 3 encode well-known Amazon S3, Google Cloud, and Microsoft Azure Blob Storage, respectively.bucketandobjectnames are optional and further depend on a given operation (one of the 4 listed above).
Let’s now assume that there is an AIS cluster with gateway at 10.0.0.207:51080. The following example illustrates all 4 (four) “easy URLs”:
In the examples above, instead of
aisprovider we could as well usegs(Google Cloud) oraz(Azure), etc.
S3 compatibility - and one important distinction
In addition to its native REST API, AIS provides S3-compatible API via /s3 API endpoint.
For instance, the following performs a GET on an object in Amazon S3 bucket:
Notice that GET URL (above) looks indistinguishable from the “easy URL” examples from the previous section.
That, in fact, is a mere coincidence - and here’s why:
/s3is an API endpoint rather than a namesake provider;- as such,
/s3provides a a whole set of Amazon S3 compatible APIs whereby the output is xml-formated, etc. - as specified in the respective Amazon documentation.
To illustrate this distinction further, let’s take a look at a list-buckets example using /s3 endpoint:
Now, if you compare this with the example from the previous section (where we used GET ‘http://10.0.0.207:51080/gs’ URL) - the difference must become clear:
- GET ‘http://10.0.0.207:51080/s3’ implements Amazon S3
list-bucketsAPI; as such it must report all buckets (across all providers and not onlys3) that can be accessed, read, and written. - GET ‘http://10.0.0.207:51080/gs’ provides “easy URL” capability, whereby
gsexplicitly specifies the backend provider.
Note that
/s3and its subordinate URL paths currently can only “see” buckets that are already present in AIStore BMD, while native API, when given sufficient permissions, can immediately access (read, write, list) any remote buckets, while adding them to the BMD “on the fly”.
That is one of the limitations of not using native API.