diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-17 17:51:38 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-17 17:51:38 +0200 |
commit | 440a577563c313f7ce6fe928ff9a18ac1ad0deb3 (patch) | |
tree | c393069dde4e140dfb705757153a5e9a17b9b66f /src/api/admin | |
parent | 5072dbd2282736b3254627c26cfcf897505330e6 (diff) | |
download | garage-440a577563c313f7ce6fe928ff9a18ac1ad0deb3.tar.gz garage-440a577563c313f7ce6fe928ff9a18ac1ad0deb3.zip |
Prefix all APIs with `v0/`
Diffstat (limited to 'src/api/admin')
-rw-r--r-- | src/api/admin/router.rs | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/api/admin/router.rs b/src/api/admin/router.rs index ae9e6681..909ef102 100644 --- a/src/api/admin/router.rs +++ b/src/api/admin/router.rs @@ -90,35 +90,35 @@ impl Endpoint { let res = router_match!(@gen_path_parser (req.method(), path, query) [ OPTIONS _ => Options, GET "/metrics" => Metrics, - GET "/status" => GetClusterStatus, + GET "/v0/status" => GetClusterStatus, // Layout endpoints - GET "/layout" => GetClusterLayout, - POST "/layout" => UpdateClusterLayout, - POST "/layout/apply" => ApplyClusterLayout, - POST "/layout/revert" => RevertClusterLayout, + GET "/v0/layout" => GetClusterLayout, + POST "/v0/layout" => UpdateClusterLayout, + POST "/v0/layout/apply" => ApplyClusterLayout, + POST "/v0/layout/revert" => RevertClusterLayout, // API key endpoints - GET "/key" if id => GetKeyInfo (query_opt::id, query_opt::search), - GET "/key" if search => GetKeyInfo (query_opt::id, query_opt::search), - POST "/key" if id => UpdateKey (query::id), - POST "/key" => CreateKey, - DELETE "/key" if id => DeleteKey (query::id), - GET "/key" => ListKeys, + GET "/v0/key" if id => GetKeyInfo (query_opt::id, query_opt::search), + GET "/v0/key" if search => GetKeyInfo (query_opt::id, query_opt::search), + POST "/v0/key" if id => UpdateKey (query::id), + POST "/v0/key" => CreateKey, + DELETE "/v0/key" if id => DeleteKey (query::id), + GET "/v0/key" => ListKeys, // Bucket endpoints - GET "/bucket" if id => GetBucketInfo (query_opt::id, query_opt::global_alias), - GET "/bucket" if global_alias => GetBucketInfo (query_opt::id, query_opt::global_alias), - GET "/bucket" => ListBuckets, - POST "/bucket" => CreateBucket, - DELETE "/bucket" if id => DeleteBucket (query::id), - PUT "/bucket/website" if id => PutBucketWebsite (query::id), - DELETE "/bucket/website" if id => DeleteBucketWebsite (query::id), + GET "/v0/bucket" if id => GetBucketInfo (query_opt::id, query_opt::global_alias), + GET "/v0/bucket" if global_alias => GetBucketInfo (query_opt::id, query_opt::global_alias), + GET "/v0/bucket" => ListBuckets, + POST "/v0/bucket" => CreateBucket, + DELETE "/v0/bucket" if id => DeleteBucket (query::id), + PUT "/v0/bucket/website" if id => PutBucketWebsite (query::id), + DELETE "/v0/bucket/website" if id => DeleteBucketWebsite (query::id), // Bucket-key permissions - POST "/bucket/allow" => BucketAllowKey, - POST "/bucket/deny" => BucketDenyKey, + POST "/v0/bucket/allow" => BucketAllowKey, + POST "/v0/bucket/deny" => BucketDenyKey, // Bucket aliases - PUT "/bucket/alias/global" => GlobalAliasBucket (query::id, query::alias), - DELETE "/bucket/alias/global" => GlobalUnaliasBucket (query::id, query::alias), - PUT "/bucket/alias/local" => LocalAliasBucket (query::id, query::access_key_id, query::alias), - DELETE "/bucket/alias/local" => LocalUnaliasBucket (query::id, query::access_key_id, query::alias), + PUT "/v0/bucket/alias/global" => GlobalAliasBucket (query::id, query::alias), + DELETE "/v0/bucket/alias/global" => GlobalUnaliasBucket (query::id, query::alias), + PUT "/v0/bucket/alias/local" => LocalAliasBucket (query::id, query::access_key_id, query::alias), + DELETE "/v0/bucket/alias/local" => LocalUnaliasBucket (query::id, query::access_key_id, query::alias), ]); if let Some(message) = query.nonempty_message() { |