From 440a577563c313f7ce6fe928ff9a18ac1ad0deb3 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 17 May 2022 17:51:38 +0200 Subject: Prefix all APIs with `v0/` --- doc/drafts/admin-api.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'doc/drafts/admin-api.md') diff --git a/doc/drafts/admin-api.md b/doc/drafts/admin-api.md index e8ed087d..cbd73e15 100644 --- a/doc/drafts/admin-api.md +++ b/doc/drafts/admin-api.md @@ -15,7 +15,7 @@ Returns internal Garage metrics in Prometheus format. ## Cluster operations -### GetClusterStatus `GET /status` +### GetClusterStatus `GET /v0/status` Returns the cluster's current status in JSON, including: @@ -94,7 +94,7 @@ Example response body: } ``` -### GetClusterLayout `GET /layout` +### GetClusterLayout `GET /v0/layout` Returns the cluster's current layout in JSON, including: @@ -143,7 +143,7 @@ Example response body: } ``` -### UpdateClusterLayout `POST /layout` +### UpdateClusterLayout `POST /v0/layout` Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls @@ -174,7 +174,7 @@ Contrary to the CLI that may update only a subset of the fields values must be specified. -### ApplyClusterLayout `POST /layout/apply` +### ApplyClusterLayout `POST /v0/layout/apply` Applies to the cluster the layout changes currently registered as staged layout changes. @@ -191,7 +191,7 @@ Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. -### RevertClusterLayout `POST /layout/revert` +### RevertClusterLayout `POST /v0/layout/revert` Clears all of the staged layout changes. @@ -212,7 +212,7 @@ existing layout in the cluster. ## Access key operations -### ListKeys `GET /key` +### ListKeys `GET /v0/key` Returns all API access keys in the cluster. @@ -231,7 +231,7 @@ Example response: ] ``` -### CreateKey `POST /key` +### CreateKey `POST /v0/key` Creates a new API access key. @@ -243,8 +243,8 @@ Request body format: } ``` -### GetKeyInfo `GET /key?id=` -### GetKeyInfo `GET /key?search=` +### GetKeyInfo `GET /v0/key?id=` +### GetKeyInfo `GET /v0/key?search=` Returns information about the requested API access key. @@ -315,11 +315,11 @@ Example response: } ``` -### DeleteKey `DELETE /key?id=` +### DeleteKey `DELETE /v0/key?id=` Deletes an API access key. -### UpdateKey `POST /key?id=` +### UpdateKey `POST /v0/key?id=` Updates information about the specified API access key. @@ -342,7 +342,7 @@ The possible flags in `allow` and `deny` are: `createBucket`. ## Bucket operations -### ListBuckets `GET /bucket` +### ListBuckets `GET /v0/bucket` Returns all storage buckets in the cluster. @@ -384,8 +384,8 @@ Example response: ] ``` -### GetBucketInfo `GET /bucket?id=` -### GetBucketInfo `GET /bucket?globalAlias=` +### GetBucketInfo `GET /v0/bucket?id=` +### GetBucketInfo `GET /v0/bucket?globalAlias=` Returns information about the requested storage bucket. @@ -418,7 +418,7 @@ Example response: } ``` -### CreateBucket `POST /bucket` +### CreateBucket `POST /v0/bucket` Creates a new storage bucket. @@ -451,13 +451,13 @@ OR Creates a new bucket, either with a global alias, a local one, or no alias at all. -### DeleteBucket `DELETE /bucket?id=` +### DeleteBucket `DELETE /v0/bucket?id=` Deletes a storage bucket. A bucket cannot be deleted if it is not empty. Warning: this will delete all aliases associated with the bucket! -### PutBucketWebsite `PUT /bucket/website?id=` +### PutBucketWebsite `PUT /v0/bucket/website?id=` Sets the website configuration for a bucket (this also enables website access for this bucket). @@ -473,14 +473,14 @@ Request body format: The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. -### DeleteBucketWebsite `DELETE /bucket/website?id=` +### DeleteBucketWebsite `DELETE /v0/bucket/website?id=` Deletes the website configuration for a bucket (disables website access for this bucket). ## Operations on permissions for keys on buckets -### BucketAllowKey `POST /bucket/allow` +### BucketAllowKey `POST /v0/bucket/allow` Allows a key to do read/write/owner operations on a bucket. @@ -501,7 +501,7 @@ Request body format: Flags in `permissions` which have the value `true` will be activated. Other flags will remain unchanged. -### BucketDenyKey `POST /bucket/deny` +### BucketDenyKey `POST /v0/bucket/deny` Denies a key from doing read/write/owner operations on a bucket. @@ -525,19 +525,19 @@ Other flags will remain unchanged. ## Operations on bucket aliases -### GlobalAliasBucket `PUT /bucket/alias/global?id=&alias=` +### GlobalAliasBucket `PUT /v0/bucket/alias/global?id=&alias=` Empty body. Creates a global alias for a bucket. -### GlobalUnaliasBucket `DELETE /bucket/alias/global?id=&alias=` +### GlobalUnaliasBucket `DELETE /v0/bucket/alias/global?id=&alias=` Removes a global alias for a bucket. -### LocalAliasBucket `PUT /bucket/alias/local?id=&accessKeyId=&alias=` +### LocalAliasBucket `PUT /v0/bucket/alias/local?id=&accessKeyId=&alias=` Empty body. Creates a local alias for a bucket in the namespace of a specific access key. -### LocalUnaliasBucket `DELETE /bucket/alias/local?id=&accessKeyId&alias=` +### LocalUnaliasBucket `DELETE /v0/bucket/alias/local?id=&accessKeyId&alias=` Removes a local alias for a bucket in the namespace of a specific access key. -- cgit v1.2.3