Bucket API alias not working #829

Closed
opened 2024-05-27 11:44:20 +00:00 by kissze · 2 comments

Hello,

I found an error with the /bucket API endpoint. If im trying to get a bucket by their alias, then the API returns the list of buckets instead of the specified bucket.

For example:

curl http://127.0.0.1:3903/v1/bucket?alias=v7demo-system -H "Accept: application/json" -H "Authorization: Bearer XXX"
[
{
"id": "94cab56ba38509c9326808be85657f3ef288082088464a2a1507e35fceb25d54",
"globalAliases": [
"v7demo-sounds"
],
"localAliases": []
},
{
"id": "d8cb14384aeb8831c67fdc3a1cda98391ad3d4c4754a86365e458fdce63c69be",
"globalAliases": [
"tesztbucket"
],
"localAliases": []
},
{
"id": "dde1dac2673f37b6de37643b4aaa7093db6a39a6b9d0baa83e2d75da2b298d1c",
"globalAliases": [
"v7demo-system"
],
"localAliases": []
}
]

Actually, it is not a big problem, because i can extract the ID from the list, but it would be nice, if the search for a global alias will work as excepted.

Or am i doing something wrong?
Thanks,
Zoltan

Hello, I found an error with the /bucket API endpoint. If im trying to get a bucket by their alias, then the API returns the list of buckets instead of the specified bucket. For example: curl http://127.0.0.1:3903/v1/bucket?alias=v7demo-system -H "Accept: application/json" -H "Authorization: Bearer XXX" [ { "id": "94cab56ba38509c9326808be85657f3ef288082088464a2a1507e35fceb25d54", "globalAliases": [ "v7demo-sounds" ], "localAliases": [] }, { "id": "d8cb14384aeb8831c67fdc3a1cda98391ad3d4c4754a86365e458fdce63c69be", "globalAliases": [ "tesztbucket" ], "localAliases": [] }, { "id": "dde1dac2673f37b6de37643b4aaa7093db6a39a6b9d0baa83e2d75da2b298d1c", "globalAliases": [ "v7demo-system" ], "localAliases": [] } ] Actually, it is not a big problem, because i can extract the ID from the list, but it would be nice, if the search for a global alias will work as excepted. Or am i doing something wrong? Thanks, Zoltan
Owner

The syntax for GetBucketInfo is GET /v1/bucket?globalAlias=<alias>

If that fixes your problem, I'll let you close this issue

The syntax for GetBucketInfo is [`GET /v1/bucket?globalAlias=<alias>`](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/commit/d38509ef4b36a558c6aea71b52d27ba561ad57a4/doc/drafts/admin-api.md#getbucketinfo-get-v1-bucket-globalalias-alias) If that fixes your problem, I'll let you close this issue
Author

Actually it fixes, thank you. Maybe it would be nice to modify the HTML documentation, because i have found this "alias=$NAME" syntax in the docs. (https://garagehq.deuxfleurs.fr/api/garage-admin-v1.html#tag/Bucket/operation/GetBucketInfo)
Just for the record: im really like your simple but replicated S3 server, so i hope it will be around for a long time.

Actually it fixes, thank you. Maybe it would be nice to modify the HTML documentation, because i have found this "alias=$NAME" syntax in the docs. (https://garagehq.deuxfleurs.fr/api/garage-admin-v1.html#tag/Bucket/operation/GetBucketInfo) Just for the record: im really like your simple but replicated S3 server, so i hope it will be around for a long time.
Sign in to join this conversation.
No milestone
No project
No assignees
2 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#829
No description provided.