alias query parameter matches only global alias, might be ambiguous #833

Open
opened 2024-06-06 01:18:07 +00:00 by jade · 3 comments

Here: https://garagehq.deuxfleurs.fr/api/garage-admin-v1.html#tag/Bucket/operation/GetBucketInfo

I have found empirically that this API endpoint ignores "alias" as a query parameter and only considers globalAlias, contrary to documentation.

Here: https://garagehq.deuxfleurs.fr/api/garage-admin-v1.html#tag/Bucket/operation/GetBucketInfo I have found empirically that this API endpoint ignores "alias" as a query parameter and only considers globalAlias, contrary to documentation.
Author
# garage --version
garage cargo:0.9.4 [features: k2v, sled, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs]
``` # garage --version garage cargo:0.9.4 [features: k2v, sled, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs] ```
quentin added the
scope
documentation
action
for-newcomers
kind
usability
labels 2024-08-07 10:15:58 +00:00
quentin added
action
more-info-needed
and removed
action
for-newcomers
labels 2024-08-07 10:17:07 +00:00
Owner

I don't understand the issue here: the description states clearly that the alias query parameter, when set, will return the bucket with the given global alias. No mention of local alias is made here. Of course, we can argue that the alias parameter is ambiguous here, as we really mean globalAlias here but it's not exactly what you stated. Maybe you can precise your thought?

I don't understand the issue here: the description states clearly that the `alias` query parameter, when set, will return the bucket with the given global alias. No mention of local alias is made here. Of course, we can argue that the `alias` parameter is ambiguous here, as we really mean `globalAlias` here but it's not exactly what you stated. Maybe you can precise your thought?
quentin changed title from [Docs] Get bucket endpoint documents alias as url parameter, but it is actually globalAlias to alias query parameter matches only global alias, might be ambiguous 2024-08-07 10:20:05 +00:00
quentin added
scope
admin-api
and removed
scope
documentation
labels 2024-08-07 10:20:12 +00:00

I think what jade means (and what I observe, too) is that providing the parameter alias doesn't work (the API returns the complete bucket list), you have to provide the parameter globalAlias to get info on the specified bucket.

This doesn't work (returns the whole bucket list):

GET /v1/bucket?alias=test-bucket

This works to get info on the specified global bucket alias:

GET /v1/bucket?globalAlias=test-bucket
I think what jade means (and what I observe, too) is that providing the parameter `alias` doesn't work (the API returns the complete bucket list), you have to provide the parameter `globalAlias` to get info on the specified bucket. This doesn't work (returns the whole bucket list): ``` GET /v1/bucket?alias=test-bucket ``` This works to get info on the specified global bucket alias: ``` GET /v1/bucket?globalAlias=test-bucket ```
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#833
No description provided.