### GET /v2/GetBucketInfo Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Given a bucket identifier (`id`) or a global alias (`alias`), get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). ```markdown ### Parameters - **id** (string, query, optional): Exact bucket ID to look up - **globalAlias** (string, query, optional): Global alias of bucket to look up - **search** (string, query, optional): Partial ID or alias to search for ### Responses #### 200 - Returns exhaustive information about the bucket **GetBucketInfoResponse** - **bytes** (integer (int64)) (required): Total number of bytes used by objects in this bucket - **corsRules** (array,null): CORS rules for this bucket - **created** (string (date-time)) (required): Bucket creation date - **globalAliases** (array (string)) (required): List of global aliases for this bucket - **id** (string) (required): Identifier of the bucket - **keys** (array (GetBucketInfoKey)) (required): List of access keys that have permissions granted on this bucket Array items: - **accessKeyId** (string) (required) - **bucketLocalAliases** (array (string)) (required) - **name** (string) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **lifecycleRules** (array,null): Object lifecycle rules for this bucket - **objects** (integer (int64)) (required): Number of objects in this bucket - **quotas** (object) (required) - **maxObjects** (integer,null) - **maxSize** (integer,null) - **unfinishedMultipartUploadBytes** (integer (int64)) (required): Total number of bytes used by unfinished multipart uploads in this bucket - **unfinishedMultipartUploadParts** (integer (int64)) (required): Number of parts in unfinished multipart uploads in this bucket - **unfinishedMultipartUploads** (integer (int64)) (required): Number of unfinished multipart uploads in this bucket - **unfinishedUploads** (integer (int64)) (required): Number of unfinished uploads in this bucket - **websiteAccess** (boolean) (required): Whether website access is enabled for this bucket - **websiteConfig** (null) #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetBucketInfo?id=string&globalAlias=string&search=string" ``` ``` -------------------------------- ### GET /v2/ListKeys Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Returns all API access keys in the cluster. ```markdown ### Responses #### 200 - Returns the key identifier (aka `AWS_ACCESS_KEY_ID`) and its associated, human friendly, name if any (otherwise return an empty string) **ListKeysResponse** - Array of ListKeysResponseItem #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/ListKeys" ``` ``` -------------------------------- ### GET /v2/ListBuckets Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json List all the buckets on the cluster with their UUID and their global and local aliases. ```markdown ### Responses #### 200 - Returns the UUID of all the buckets and all their aliases **ListBucketsResponse** - Array of ListBucketsResponseItem #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/ListBuckets" ``` ``` -------------------------------- ### POST /v2/AllowBucketKey Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation. ```markdown ### Request Body **Content-Type:** application/json - **accessKeyId** (string) (required) - **bucketId** (string) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) ### Responses #### 200 - Returns exhaustive information about the bucket **AllowBucketKeyResponse** - **bytes** (integer (int64)) (required): Total number of bytes used by objects in this bucket - **corsRules** (array,null): CORS rules for this bucket - **created** (string (date-time)) (required): Bucket creation date - **globalAliases** (array (string)) (required): List of global aliases for this bucket - **id** (string) (required): Identifier of the bucket - **keys** (array (GetBucketInfoKey)) (required): List of access keys that have permissions granted on this bucket Array items: - **accessKeyId** (string) (required) - **bucketLocalAliases** (array (string)) (required) - **name** (string) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **lifecycleRules** (array,null): Object lifecycle rules for this bucket - **objects** (integer (int64)) (required): Number of objects in this bucket - **quotas** (object) (required) - **maxObjects** (integer,null) - **maxSize** (integer,null) - **unfinishedMultipartUploadBytes** (integer (int64)) (required): Total number of bytes used by unfinished multipart uploads in this bucket - **unfinishedMultipartUploadParts** (integer (int64)) (required): Number of parts in unfinished multipart uploads in this bucket - **unfinishedMultipartUploads** (integer (int64)) (required): Number of unfinished multipart uploads in this bucket - **unfinishedUploads** (integer (int64)) (required): Number of unfinished uploads in this bucket - **websiteAccess** (boolean) (required): Whether website access is enabled for this bucket - **websiteConfig** (null) #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/AllowBucketKey" \ -H "Content-Type: application/json" \ -d '{ "accessKeyId": "string", "bucketId": "string", "permissions": "value" }' ``` ``` -------------------------------- ### GET /metrics Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Prometheus metrics endpoint ```markdown ### Responses #### 200 - Garage daemon metrics exported in Prometheus format Empty response body ### Example Usage ```bash curl -X GET "http://localhost:3903//metrics" ``` ``` -------------------------------- ### GET /v2/GetKeyInfo Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Return information about a specific key like its identifiers, its permissions and buckets on which it has permissions. You can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`). For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it. ```markdown ### Parameters - **id** (string, query, optional): Access key ID - **search** (string, query, optional): Partial key ID or name to search for - **showSecretKey** (boolean, query, optional): Whether to return the secret access key ### Responses #### 200 - Information about the access key **GetKeyInfoResponse** - **accessKeyId** (string) (required) - **buckets** (array (KeyInfoBucketResponse)) (required) Array items: - **globalAliases** (array (string)) (required) - **id** (string) (required) - **localAliases** (array (string)) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **created** (string,null) - **expiration** (string,null) - **expired** (boolean) (required) - **name** (string) (required) - **permissions** (object) (required) - **createBucket** (boolean) - **secretAccessKey** (string,null) #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetKeyInfo?id=string&search=string&showSecretKey=true" ``` ``` -------------------------------- ### POST /v2/DenyBucketKey Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation. ```markdown ### Request Body **Content-Type:** application/json - **accessKeyId** (string) (required) - **bucketId** (string) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) ### Responses #### 200 - Returns exhaustive information about the bucket **DenyBucketKeyResponse** - **bytes** (integer (int64)) (required): Total number of bytes used by objects in this bucket - **corsRules** (array,null): CORS rules for this bucket - **created** (string (date-time)) (required): Bucket creation date - **globalAliases** (array (string)) (required): List of global aliases for this bucket - **id** (string) (required): Identifier of the bucket - **keys** (array (GetBucketInfoKey)) (required): List of access keys that have permissions granted on this bucket Array items: - **accessKeyId** (string) (required) - **bucketLocalAliases** (array (string)) (required) - **name** (string) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **lifecycleRules** (array,null): Object lifecycle rules for this bucket - **objects** (integer (int64)) (required): Number of objects in this bucket - **quotas** (object) (required) - **maxObjects** (integer,null) - **maxSize** (integer,null) - **unfinishedMultipartUploadBytes** (integer (int64)) (required): Total number of bytes used by unfinished multipart uploads in this bucket - **unfinishedMultipartUploadParts** (integer (int64)) (required): Number of parts in unfinished multipart uploads in this bucket - **unfinishedMultipartUploads** (integer (int64)) (required): Number of unfinished multipart uploads in this bucket - **unfinishedUploads** (integer (int64)) (required): Number of unfinished uploads in this bucket - **websiteAccess** (boolean) (required): Whether website access is enabled for this bucket - **websiteConfig** (null) #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/DenyBucketKey" \ -H "Content-Type: application/json" \ -d '{ "accessKeyId": "string", "bucketId": "string", "permissions": "value" }' ``` ``` -------------------------------- ### GET /check Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Static website domain name check. Checks whether a bucket is configured to serve a static website for the requested domain. This is used by reverse proxies such as Caddy or Tricot, to avoid requesting TLS certificates for domain names that do not correspond to an actual website. ```markdown ### Parameters - **domain** (string, query, required): The domain name to check for ### Responses #### 200 - The domain name redirects to a static website bucket Empty response body #### 400 - No static website bucket exists for this domain No static website bucket exists for this domain ### Example Usage ```bash curl -X GET "http://localhost:3903//check?domain=string" ``` ``` -------------------------------- ### GET /v2/GetNodeInfo Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Return information about the Garage daemon running on one or several nodes. ```markdown ### Parameters - **node** (string, query, required): Node ID to query, or `*` for all nodes, or `self` for the node responding to the request ### Responses #### 200 - Responses from individual cluster nodes **MultiResponse_LocalGetNodeInfoResponse** - **error** (object) (required): Map of node id to error message, for nodes that were unable to complete the API call - **success** (object) (required): Map of node id to response returned by this node, for nodes that were able to successfully complete the API call #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetNodeInfo?node=string" ``` ``` -------------------------------- ### GET /v2/ListAdminTokens Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Returns all admin API tokens in the cluster. ```markdown ### Responses #### 200 - Returns info about all admin API tokens **ListAdminTokensResponse** - Array of GetAdminTokenInfoResponse #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/ListAdminTokens" ``` ``` -------------------------------- ### GET /v2/GetCurrentAdminTokenInfo Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Return information about the calling admin API token. ```markdown ### Responses #### 200 - Information about the admin token **GetCurrentAdminTokenInfoResponse** - **created** (string,null): Creation date - **expiration** (string,null): Expiration time and date, formatted according to RFC 3339 - **expired** (boolean) (required): Whether this admin token is expired already - **id** (string,null): Identifier of the admin token (which is also a prefix of the full bearer token) - **name** (string) (required): Name of the admin API token - **scope** (array (string)) (required): Scope of the admin API token, a list of admin endpoint names (such as `GetClusterStatus`, etc), or the special value `*` to allow all admin endpoints #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetCurrentAdminTokenInfo" ``` ``` -------------------------------- ### POST /v2/CreateBucket Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. ```markdown ### Request Body **Content-Type:** application/json - **globalAlias** (string,null) - **localAlias** (null) ### Responses #### 200 - Returns exhaustive information about the bucket **CreateBucketResponse** - **bytes** (integer (int64)) (required): Total number of bytes used by objects in this bucket - **corsRules** (array,null): CORS rules for this bucket - **created** (string (date-time)) (required): Bucket creation date - **globalAliases** (array (string)) (required): List of global aliases for this bucket - **id** (string) (required): Identifier of the bucket - **keys** (array (GetBucketInfoKey)) (required): List of access keys that have permissions granted on this bucket Array items: - **accessKeyId** (string) (required) - **bucketLocalAliases** (array (string)) (required) - **name** (string) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **lifecycleRules** (array,null): Object lifecycle rules for this bucket - **objects** (integer (int64)) (required): Number of objects in this bucket - **quotas** (object) (required) - **maxObjects** (integer,null) - **maxSize** (integer,null) - **unfinishedMultipartUploadBytes** (integer (int64)) (required): Total number of bytes used by unfinished multipart uploads in this bucket - **unfinishedMultipartUploadParts** (integer (int64)) (required): Number of parts in unfinished multipart uploads in this bucket - **unfinishedMultipartUploads** (integer (int64)) (required): Number of unfinished multipart uploads in this bucket - **unfinishedUploads** (integer (int64)) (required): Number of unfinished uploads in this bucket - **websiteAccess** (boolean) (required): Whether website access is enabled for this bucket - **websiteConfig** (null) #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/CreateBucket" \ -H "Content-Type: application/json" \ -d '{ "globalAlias": "value", "localAlias": "value" }' ``` ``` -------------------------------- ### POST /v2/ClusterLayoutSkipDeadNodes Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Force progress in layout update trackers ```markdown ### Request Body **Content-Type:** application/json - **allowMissingData** (boolean) (required): Allow the skip even if a quorum of nodes could not be found for the data among the remaining nodes - **version** (integer (int64)) (required): Version number of the layout to assume is currently up-to-date. This will generally be the current layout version. ### Responses #### 200 - Request has been taken into account **ClusterLayoutSkipDeadNodesResponse** - **ackUpdated** (array (string)) (required): Nodes for which the ACK update tracker has been updated to `version` - **syncUpdated** (array (string)) (required): If `allow_missing_data` is set, nodes for which the SYNC update tracker has been updated to `version` #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/ClusterLayoutSkipDeadNodes" \ -H "Content-Type: application/json" \ -d '{ "allowMissingData": "true", "version": "0" }' ``` ``` -------------------------------- ### GET /v2/GetClusterLayoutHistory Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Returns the history of layouts in the cluster ```markdown ### Responses #### 200 - Cluster layout history **GetClusterLayoutHistoryResponse** - **currentVersion** (integer (int64)) (required): The current version number of the cluster layout - **minAck** (integer (int64)) (required): All nodes in the cluster are aware of layout versions up to this version number (at least) - **updateTrackers** (object,null): Detailed update trackers for nodes (see `https://garagehq.deuxfleurs.fr/blog/2023-12-preserving-read-after-write-consistency/`) - **versions** (array (ClusterLayoutVersion)) (required): Layout version history Array items: - **gatewayNodes** (integer (int64)) (required): Number of nodes with a gateway role in this layout version - **status** (string (Current|Draining|Historical)) (required) ("Current"|"Draining"|"Historical") - **storageNodes** (integer (int64)) (required): Number of nodes with an assigned storage capacity in this layout version - **version** (integer (int64)) (required): Version number of this layout version #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetClusterLayoutHistory" ``` ``` -------------------------------- ### POST /v2/CreateKey Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Creates a new API access key. ```markdown ### Request Body **Content-Type:** application/json - **allow** (null) - **deny** (null) - **expiration** (string,null): Expiration time and date, formatted according to RFC 3339 - **name** (string,null): Name of the API key - **neverExpires** (boolean): Set the access key to never expire ### Responses #### 200 - Access key has been created **CreateKeyResponse** - **accessKeyId** (string) (required) - **buckets** (array (KeyInfoBucketResponse)) (required) Array items: - **globalAliases** (array (string)) (required) - **id** (string) (required) - **localAliases** (array (string)) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **created** (string,null) - **expiration** (string,null) - **expired** (boolean) (required) - **name** (string) (required) - **permissions** (object) (required) - **createBucket** (boolean) - **secretAccessKey** (string,null) #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/CreateKey" \ -H "Content-Type: application/json" \ -d '{ "allow": "value", "deny": "value", "expiration": "value", "name": "value", "neverExpires": "true" }' ``` ``` -------------------------------- ### Schema: website.Redirect Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Schema definition for website.Redirect ```markdown ## Schema: website.Redirect Schema definition for website.Redirect **Type:** object - **HostName** (unknown) - **HttpRedirectCode** (null) - **Protocol** (unknown) - **ReplaceKeyPrefixWith** (unknown) - **ReplaceKeyWith** (unknown) ``` -------------------------------- ### Schema: CreateBucketResponse Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Schema definition for CreateBucketResponse ```markdown ## Schema: CreateBucketResponse Schema definition for CreateBucketResponse **Type:** object - **bytes** (integer (int64)) (required): Total number of bytes used by objects in this bucket - **corsRules** (array,null): CORS rules for this bucket - **created** (string (date-time)) (required): Bucket creation date - **globalAliases** (array (string)) (required): List of global aliases for this bucket - **id** (string) (required): Identifier of the bucket - **keys** (array (GetBucketInfoKey)) (required): List of access keys that have permissions granted on this bucket Array items: - **accessKeyId** (string) (required) - **bucketLocalAliases** (array (string)) (required) - **name** (string) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **lifecycleRules** (array,null): Object lifecycle rules for this bucket - **objects** (integer (int64)) (required): Number of objects in this bucket - **quotas** (object) (required) - **maxObjects** (integer,null) - **maxSize** (integer,null) - **unfinishedMultipartUploadBytes** (integer (int64)) (required): Total number of bytes used by unfinished multipart uploads in this bucket - **unfinishedMultipartUploadParts** (integer (int64)) (required): Number of parts in unfinished multipart uploads in this bucket - **unfinishedMultipartUploads** (integer (int64)) (required): Number of unfinished multipart uploads in this bucket - **unfinishedUploads** (integer (int64)) (required): Number of unfinished uploads in this bucket - **websiteAccess** (boolean) (required): Whether website access is enabled for this bucket - **websiteConfig** (null) ``` -------------------------------- ### POST /v2/CreateAdminToken Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Creates a new admin API token ```markdown ### Request Body **Content-Type:** application/json - **expiration** (string,null): Expiration time and date, formatted according to RFC 3339 - **name** (string,null): Name of the admin API token - **neverExpires** (boolean): Set the admin token to never expire - **scope** (array,null): Scope of the admin API token, a list of admin endpoint names (such as `GetClusterStatus`, etc), or the special value `*` to allow all admin endpoints. **WARNING:** Granting a scope of `CreateAdminToken` or `UpdateAdminToken` trivially allows for privilege escalation, and is thus functionally equivalent to granting a scope of `*`. ### Responses #### 200 - Admin token has been created **CreateAdminTokenResponse** - **created** (string,null): Creation date - **expiration** (string,null): Expiration time and date, formatted according to RFC 3339 - **expired** (boolean) (required): Whether this admin token is expired already - **id** (string,null): Identifier of the admin token (which is also a prefix of the full bearer token) - **name** (string) (required): Name of the admin API token - **scope** (array (string)) (required): Scope of the admin API token, a list of admin endpoint names (such as `GetClusterStatus`, etc), or the special value `*` to allow all admin endpoints - **secretToken** (string) (required): The secret bearer token. **CAUTION:** This token will be shown only ONCE, so this value MUST be remembered somewhere, or the token will be unusable. #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/CreateAdminToken" \ -H "Content-Type: application/json" \ -d '{ "expiration": "value", "name": "value", "neverExpires": "true", "scope": "value" }' ``` ``` -------------------------------- ### Schema: AllowBucketKeyResponse Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Schema definition for AllowBucketKeyResponse ```markdown ## Schema: AllowBucketKeyResponse Schema definition for AllowBucketKeyResponse **Type:** object - **bytes** (integer (int64)) (required): Total number of bytes used by objects in this bucket - **corsRules** (array,null): CORS rules for this bucket - **created** (string (date-time)) (required): Bucket creation date - **globalAliases** (array (string)) (required): List of global aliases for this bucket - **id** (string) (required): Identifier of the bucket - **keys** (array (GetBucketInfoKey)) (required): List of access keys that have permissions granted on this bucket Array items: - **accessKeyId** (string) (required) - **bucketLocalAliases** (array (string)) (required) - **name** (string) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **lifecycleRules** (array,null): Object lifecycle rules for this bucket - **objects** (integer (int64)) (required): Number of objects in this bucket - **quotas** (object) (required) - **maxObjects** (integer,null) - **maxSize** (integer,null) - **unfinishedMultipartUploadBytes** (integer (int64)) (required): Total number of bytes used by unfinished multipart uploads in this bucket - **unfinishedMultipartUploadParts** (integer (int64)) (required): Number of parts in unfinished multipart uploads in this bucket - **unfinishedMultipartUploads** (integer (int64)) (required): Number of unfinished multipart uploads in this bucket - **unfinishedUploads** (integer (int64)) (required): Number of unfinished uploads in this bucket - **websiteAccess** (boolean) (required): Whether website access is enabled for this bucket - **websiteConfig** (null) ``` -------------------------------- ### Schema: ApiBucketKeyPerm Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Schema definition for ApiBucketKeyPerm ```markdown ## Schema: ApiBucketKeyPerm Schema definition for ApiBucketKeyPerm **Type:** object - **owner** (boolean) - **read** (boolean) - **write** (boolean) ``` -------------------------------- ### POST /v2/GetWorkerInfo Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Get information about the specified background worker on one or several cluster nodes. ```markdown ### Parameters - **node** (string, query, required): Node ID to query, or `*` for all nodes, or `self` for the node responding to the request ### Request Body **Content-Type:** application/json - **id** (integer (int64)) (required) ### Responses #### 200 - Responses from individual cluster nodes **MultiResponse_LocalGetWorkerInfoResponse** - **error** (object) (required): Map of node id to error message, for nodes that were unable to complete the API call - **success** (object) (required): Map of node id to response returned by this node, for nodes that were able to successfully complete the API call #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/GetWorkerInfo?node=string" \ -H "Content-Type: application/json" \ -d '{ "id": "0" }' ``` ``` -------------------------------- ### GET /v2/ListBlockErrors Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json List data blocks that are currently in an errored state on one or several Garage nodes. ```markdown ### Parameters - **node** (string, query, required): Node ID to query, or `*` for all nodes, or `self` for the node responding to the request ### Responses #### 200 - Responses from individual cluster nodes **MultiResponse_LocalListBlockErrorsResponse** - **error** (object) (required): Map of node id to error message, for nodes that were unable to complete the API call - **success** (object) (required): Map of node id to response returned by this node, for nodes that were able to successfully complete the API call #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/ListBlockErrors?node=string" ``` ``` -------------------------------- ### POST /v2/UpdateClusterLayout Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /GetClusterHealth`. Once the set of staged changes is satisfactory, the user may call `POST /ApplyClusterLayout` to apply the changed changes, or `POST /RevertClusterLayout` to clear all of the staged changes in the layout. Setting the capacity to `null` will configure the node as a gateway. Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights). For example to declare 100GB, you must set `capacity: 100000000000`. Garage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes). ```markdown ### Request Body **Content-Type:** application/json - **parameters** (null) - **roles** (array (NodeRoleChangeRequest)): New node roles to assign or remove in the cluster layout Array items: - **id** (string) (required): ID of the node for which this change applies - **remove** (boolean) (required): Set `remove` to `true` to remove the node from the layout ### Responses #### 200 - Proposed changes have been added to the list of pending changes **UpdateClusterLayoutResponse** - **parameters** (object) (required) - **zoneRedundancy** (object) (required): Partitions must be replicated in at least this number of distinct zones. - **atLeast** (integer) (required): Partitions must be replicated in at least this number of distinct zones. - **partitionSize** (integer (int64)) (required): The size, in bytes, of one Garage partition (= a shard) - **roles** (array (LayoutNodeRole)) (required): List of nodes that currently have a role in the cluster layout Array items: - **capacity** (integer,null): Capacity (in bytes) assigned by the cluster administrator, absent for gateway nodes - **id** (string) (required): Identifier of the node - **storedPartitions** (integer,null): Number of partitions stored on this node (a result of the layout computation) - **tags** (array (string)) (required): List of tags assigned by the cluster administrator - **usableCapacity** (integer,null): Capacity (in bytes) that is actually usable on this node in the current layout, which is equal to `stored_partitions` × `partition_size` - **zone** (string) (required): Zone name assigned by the cluster administrator - **stagedParameters** (null) - **stagedRoleChanges** (array (NodeRoleChange)) (required): List of nodes that will have a new role or whose role will be removed in the next version of the cluster layout Array items: - **remove** (boolean) (required): Set `remove` to `true` to remove the node from the layout - **id** (string) (required): ID of the node for which this change applies - **version** (integer (int64)) (required): The current version number of the cluster layout #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/UpdateClusterLayout" \ -H "Content-Type: application/json" \ -d '{ "parameters": "value", "roles": [ "value" ] }' ``` ``` -------------------------------- ### POST /v2/CreateMetadataSnapshot Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Instruct one or several nodes to take a snapshot of their metadata databases. ```markdown ### Parameters - **node** (string, query, required): Node ID to query, or `*` for all nodes, or `self` for the node responding to the request ### Responses #### 200 - Responses from individual cluster nodes **MultiResponse_LocalCreateMetadataSnapshotResponse** - **error** (object) (required): Map of node id to error message, for nodes that were unable to complete the API call - **success** (object) (required): Map of node id to response returned by this node, for nodes that were able to successfully complete the API call #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/CreateMetadataSnapshot?node=string" ``` ``` -------------------------------- ### Schema: KeyInfoBucketResponse Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Schema definition for KeyInfoBucketResponse ```markdown ## Schema: KeyInfoBucketResponse Schema definition for KeyInfoBucketResponse **Type:** object - **globalAliases** (array (string)) (required) - **id** (string) (required) - **localAliases** (array (string)) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) ``` -------------------------------- ### POST /v2/ConnectClusterNodes Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. ```markdown ### Request Body **Content-Type:** application/json - Array of string ### Responses #### 200 - The request has been handled correctly but it does not mean that all connection requests succeeded; some might have fail, you need to check the body! **ConnectClusterNodesResponse** - Array of ConnectNodeResponse #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/ConnectClusterNodes" \ -H "Content-Type: application/json" \ -d '[ "string" ]' ``` ``` -------------------------------- ### GET /v2/GetClusterStatistics Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Fetch global cluster statistics. *Note: do not try to parse the `freeform` field of the response, it is given as a string specifically because its format is not stable.* ```markdown ### Responses #### 200 - Global cluster statistics **GetClusterStatisticsResponse** - **bucketCount** (integer,null): number of buckets in the cluster - **dataAvail** (integer,null): available storage space for object data in the entire cluster, in bytes - **freeform** (string) (required): cluster statistics as a free-form string, kept for compatibility with nodes running older v2.x versions of garage - **incompleteAvailInfo** (boolean,null): true if the available storage space statistics are imprecise due to missing information of disconnected nodes. When this is the case, the actual space available in the cluster might be lower than the reported values. - **metadataAvail** (integer,null): available storage space for object metadata in the entire cluster, in bytes - **totalObjectBytes** (integer,null): total size of objects stored in all buckets, before compression, deduplication and replication (this is NOT equivalent to actual disk usage in the cluster) - **totalObjectCount** (integer,null): total number of objects stored in all buckets #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetClusterStatistics" ``` ``` -------------------------------- ### GET /v2/GetAdminTokenInfo Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Return information about a specific admin API token. You can search by specifying the exact token identifier (`id`) or by specifying a pattern (`search`). ```markdown ### Parameters - **id** (string, query, optional): Admin API token ID - **search** (string, query, optional): Partial token ID or name to search for ### Responses #### 200 - Information about the admin token **GetAdminTokenInfoResponse** - **created** (string,null): Creation date - **expiration** (string,null): Expiration time and date, formatted according to RFC 3339 - **expired** (boolean) (required): Whether this admin token is expired already - **id** (string,null): Identifier of the admin token (which is also a prefix of the full bearer token) - **name** (string) (required): Name of the admin API token - **scope** (array (string)) (required): Scope of the admin API token, a list of admin endpoint names (such as `GetClusterStatus`, etc), or the special value `*` to allow all admin endpoints #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetAdminTokenInfo?id=string&search=string" ``` ``` -------------------------------- ### Schema: LocalLaunchRepairOperationRequest Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Schema definition for LocalLaunchRepairOperationRequest ```markdown ## Schema: LocalLaunchRepairOperationRequest Schema definition for LocalLaunchRepairOperationRequest **Type:** object - **repairType** (string (tables)) (required) ("tables") ``` -------------------------------- ### POST /v2/ImportKey Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.** ```markdown ### Request Body **Content-Type:** application/json - **accessKeyId** (string) (required) - **name** (string,null) - **secretAccessKey** (string) (required) ### Responses #### 200 - Access key has been imported **ImportKeyResponse** - **accessKeyId** (string) (required) - **buckets** (array (KeyInfoBucketResponse)) (required) Array items: - **globalAliases** (array (string)) (required) - **id** (string) (required) - **localAliases** (array (string)) (required) - **permissions** (object) (required) - **owner** (boolean) - **read** (boolean) - **write** (boolean) - **created** (string,null) - **expiration** (string,null) - **expired** (boolean) (required) - **name** (string) (required) - **permissions** (object) (required) - **createBucket** (boolean) - **secretAccessKey** (string,null) #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X POST "http://localhost:3903//v2/ImportKey" \ -H "Content-Type: application/json" \ -d '{ "accessKeyId": "string", "name": "value", "secretAccessKey": "string" }' ``` ``` -------------------------------- ### GET /v2/GetNodeStatistics Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Fetch statistics for one or several Garage nodes. *Note: do not try to parse the `freeform` field of the response, it is given as a string specifically because its format is not stable.* ```markdown ### Parameters - **node** (string, query, required): Node ID to query, or `*` for all nodes, or `self` for the node responding to the request ### Responses #### 200 - Responses from individual cluster nodes **MultiResponse_LocalGetNodeStatisticsResponse** - **error** (object) (required): Map of node id to error message, for nodes that were unable to complete the API call - **success** (object) (required): Map of node id to response returned by this node, for nodes that were able to successfully complete the API call #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetNodeStatistics?node=string" ``` ``` -------------------------------- ### Schema: LocalLaunchRepairOperationResponse Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Schema definition for LocalLaunchRepairOperationResponse ```markdown ## Schema: LocalLaunchRepairOperationResponse Schema definition for LocalLaunchRepairOperationResponse **Type:** object ``` -------------------------------- ### GET /v2/GetClusterLayout Source: https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes* ```markdown ### Responses #### 200 - Current cluster layout **GetClusterLayoutResponse** - **parameters** (object) (required) - **zoneRedundancy** (object) (required): Partitions must be replicated in at least this number of distinct zones. - **atLeast** (integer) (required): Partitions must be replicated in at least this number of distinct zones. - **partitionSize** (integer (int64)) (required): The size, in bytes, of one Garage partition (= a shard) - **roles** (array (LayoutNodeRole)) (required): List of nodes that currently have a role in the cluster layout Array items: - **capacity** (integer,null): Capacity (in bytes) assigned by the cluster administrator, absent for gateway nodes - **id** (string) (required): Identifier of the node - **storedPartitions** (integer,null): Number of partitions stored on this node (a result of the layout computation) - **tags** (array (string)) (required): List of tags assigned by the cluster administrator - **usableCapacity** (integer,null): Capacity (in bytes) that is actually usable on this node in the current layout, which is equal to `stored_partitions` × `partition_size` - **zone** (string) (required): Zone name assigned by the cluster administrator - **stagedParameters** (null) - **stagedRoleChanges** (array (NodeRoleChange)) (required): List of nodes that will have a new role or whose role will be removed in the next version of the cluster layout Array items: - **remove** (boolean) (required): Set `remove` to `true` to remove the node from the layout - **id** (string) (required): ID of the node for which this change applies - **version** (integer (int64)) (required): The current version number of the cluster layout #### 500 - Internal server error Internal server error ### Example Usage ```bash curl -X GET "http://localhost:3903//v2/GetClusterLayout" ``` ```