garage/doc/api/garage-admin-v2.json
Alex Auvolat 5e7307cbf3
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
admin api: add comments for InspectObject
2025-04-06 14:21:54 +02:00

4273 lines
121 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"openapi": "3.1.0",
"info": {
"title": "Garage administration API",
"description": "Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks.\n\n*Disclaimer: This API may change in future Garage versions. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is early stage and can contain bugs, so be careful and please report any issues on our issue tracker.*",
"contact": {
"name": "The Garage team",
"url": "https://garagehq.deuxfleurs.fr/",
"email": "garagehq@deuxfleurs.fr"
},
"license": {
"name": "AGPL-3.0",
"identifier": "AGPL-3.0"
},
"version": "v2.0.0"
},
"servers": [
{
"url": "http://localhost:3903/",
"description": "A local server"
}
],
"paths": {
"/check": {
"get": {
"tags": [
"Special endpoints"
],
"description": "\nStatic website domain name check. Checks whether a bucket is configured to serve\na static website for the requested domain. This is used by reverse proxies such\nas Caddy or Tricot, to avoid requesting TLS certificates for domain names that\ndo not correspond to an actual website.\n ",
"operationId": "CheckDomain",
"parameters": [
{
"name": "domain",
"in": "path",
"description": "The domain name to check for",
"required": true
}
],
"responses": {
"200": {
"description": "The domain name redirects to a static website bucket"
},
"400": {
"description": "No static website bucket exists for this domain"
}
},
"security": [
{}
]
}
},
"/health": {
"get": {
"tags": [
"Special endpoints"
],
"description": "\nCheck cluster health. The status code returned by this function indicates\nwhether this Garage daemon can answer API requests.\nGarage will return `200 OK` even if some storage nodes are disconnected,\nas long as it is able to have a quorum of nodes for read and write operations.\n ",
"operationId": "Health",
"responses": {
"200": {
"description": "Garage is able to answer requests"
},
"503": {
"description": "This Garage daemon is not able to handle requests"
}
},
"security": [
{}
]
}
},
"/metrics": {
"get": {
"tags": [
"Special endpoints"
],
"description": "Prometheus metrics endpoint",
"operationId": "Metrics",
"responses": {
"200": {
"description": "Garage daemon metrics exported in Prometheus format"
}
},
"security": [
{},
{
"bearerAuth": []
}
]
}
},
"/v2/AddBucketAlias": {
"post": {
"tags": [
"Bucket alias"
],
"description": "Add an alias for the target bucket. This can be either a global or a local alias, depending on which fields are specified.",
"operationId": "AddBucketAlias",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddBucketAliasRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Returns exhaustive information about the bucket",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddBucketAliasResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/AllowBucketKey": {
"post": {
"tags": [
"Permission"
],
"description": "\n⚠ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious.\n\nAllows a key to do read/write/owner operations on a bucket.\n\nFlags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value).\n\nFor example, if you set read to true, the key will be allowed to read the bucket.\nIf you set it to false, the key will keeps its previous read permission.\nIf you want to disallow read for the key, check the DenyBucketKey operation.\n ",
"operationId": "AllowBucketKey",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AllowBucketKeyRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Returns exhaustive information about the bucket",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AllowBucketKeyResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ApplyClusterLayout": {
"post": {
"tags": [
"Cluster layout"
],
"description": "\nApplies to the cluster the layout changes currently registered as staged layout changes.\n\n*Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*\n ",
"operationId": "ApplyClusterLayout",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApplyClusterLayoutRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "The updated cluster layout has been applied in the cluster",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApplyClusterLayoutResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/CleanupIncompleteUploads": {
"post": {
"tags": [
"Bucket"
],
"description": "Removes all incomplete multipart uploads that are older than the specified number of seconds.",
"operationId": "CleanupIncompleteUploads",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CleanupIncompleteUploadsRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "The bucket was cleaned up successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CleanupIncompleteUploadsResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ClusterLayoutSkipDeadNodes": {
"post": {
"tags": [
"Cluster layout"
],
"description": "Force progress in layout update trackers",
"operationId": "ClusterLayoutSkipDeadNodes",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClusterLayoutSkipDeadNodesRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Request has been taken into account",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClusterLayoutSkipDeadNodesResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ConnectClusterNodes": {
"post": {
"tags": [
"Cluster"
],
"description": "Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start.",
"operationId": "ConnectClusterNodes",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectClusterNodesRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "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!",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectClusterNodesResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/CreateAdminToken": {
"post": {
"tags": [
"Admin API token"
],
"description": "Creates a new admin API token",
"operationId": "CreateAdminToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateAdminTokenRequestBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Admin token has been created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAdminTokenResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/CreateBucket": {
"post": {
"tags": [
"Bucket"
],
"description": "\nCreates a new bucket, either with a global alias, a local one, or no alias at all.\nTechnically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases.\n ",
"operationId": "CreateBucket",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateBucketRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Returns exhaustive information about the bucket",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateBucketResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/CreateKey": {
"post": {
"tags": [
"Access key"
],
"description": "Creates a new API access key.",
"operationId": "CreateKey",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateKeyRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Access key has been created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateKeyResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/CreateMetadataSnapshot": {
"post": {
"tags": [
"Node"
],
"description": "\nInstruct one or several nodes to take a snapshot of their metadata databases.\n ",
"operationId": "CreateMetadataSnapshot",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalCreateMetadataSnapshotResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/DeleteAdminToken": {
"post": {
"tags": [
"Admin API token"
],
"description": "Delete an admin API token from the cluster, revoking all its permissions.",
"operationId": "DeleteAdminToken",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Admin API token ID",
"required": true
}
],
"responses": {
"200": {
"description": "Admin token has been deleted"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/DeleteBucket": {
"post": {
"tags": [
"Bucket"
],
"description": "\nDeletes a storage bucket. A bucket cannot be deleted if it is not empty.\n\n**Warning:** this will delete all aliases associated with the bucket!\n ",
"operationId": "DeleteBucket",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the bucket to delete",
"required": true
}
],
"responses": {
"200": {
"description": "Bucket has been deleted"
},
"400": {
"description": "Bucket is not empty"
},
"404": {
"description": "Bucket not found"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/DeleteKey": {
"post": {
"tags": [
"Access key"
],
"description": "Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. ",
"operationId": "DeleteKey",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Access key ID",
"required": true
}
],
"responses": {
"200": {
"description": "Access key has been deleted"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/DenyBucketKey": {
"post": {
"tags": [
"Permission"
],
"description": "\n⚠ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious.\n\nDenies a key from doing read/write/owner operations on a bucket.\n\nFlags in permissions which have the value true will be deactivated. Other flags will remain unchanged.\n\nFor example, if you set read to true, the key will be denied from reading.\nIf you set read to false, the key will keep its previous permissions.\nIf you want the key to have the reading permission, check the AllowBucketKey operation.\n ",
"operationId": "DenyBucketKey",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DenyBucketKeyRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Returns exhaustive information about the bucket",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DenyBucketKeyResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetAdminTokenInfo": {
"get": {
"tags": [
"Admin API token"
],
"description": "\nReturn information about a specific admin API token.\nYou can search by specifying the exact token identifier (`id`) or by specifying a pattern (`search`).\n ",
"operationId": "GetAdminTokenInfo",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Admin API token ID",
"required": true,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "search",
"in": "path",
"description": "Partial token ID or name to search for",
"required": true,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Information about the admin token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAdminTokenInfoResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetBlockInfo": {
"post": {
"tags": [
"Block"
],
"description": "\nGet detailed information about a data block stored on a Garage node, including all object versions and in-progress multipart uploads that contain a reference to this block.\n ",
"operationId": "GetBlockInfo",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LocalGetBlockInfoRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Detailed block information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalGetBlockInfoResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetBucketInfo": {
"get": {
"tags": [
"Bucket"
],
"description": "\nGiven a bucket identifier (`id`) or a global alias (`alias`), get its information.\nIt includes its aliases, its web configuration, keys that have some permissions\non it, some statistics (number of objects, size), number of dangling multipart uploads,\nand its quotas (if any).\n ",
"operationId": "GetBucketInfo",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Exact bucket ID to look up",
"required": true,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "globalAlias",
"in": "path",
"description": "Global alias of bucket to look up",
"required": true,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "search",
"in": "path",
"description": "Partial ID or alias to search for",
"required": true,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Returns exhaustive information about the bucket",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetBucketInfoResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetClusterHealth": {
"get": {
"tags": [
"Cluster"
],
"description": "Returns the global status of the cluster, the number of connected nodes (over the number of known ones), the number of healthy storage nodes (over the declared ones), and the number of healthy partitions (over the total).",
"operationId": "GetClusterHealth",
"responses": {
"200": {
"description": "Cluster health report",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetClusterHealthResponse"
}
}
}
}
}
}
},
"/v2/GetClusterLayout": {
"get": {
"tags": [
"Cluster layout"
],
"description": "\nReturns the cluster's current layout, including:\n\n- Currently configured cluster layout\n- Staged changes to the cluster layout\n\n*Capacity is given in bytes*\n ",
"operationId": "GetClusterLayout",
"responses": {
"200": {
"description": "Current cluster layout",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetClusterLayoutResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetClusterLayoutHistory": {
"get": {
"tags": [
"Cluster layout"
],
"description": "\nReturns the history of layouts in the cluster\n ",
"operationId": "GetClusterLayoutHistory",
"responses": {
"200": {
"description": "Cluster layout history",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetClusterLayoutHistoryResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetClusterStatistics": {
"get": {
"tags": [
"Cluster"
],
"description": "\nFetch global cluster statistics.\n\n*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.*\n ",
"operationId": "GetClusterStatistics",
"responses": {
"200": {
"description": "Global cluster statistics",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetClusterStatisticsResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetClusterStatus": {
"get": {
"tags": [
"Cluster"
],
"description": "\nReturns the cluster's current status, including:\n\n- ID of the node being queried and its version of the Garage daemon\n- Live nodes\n- Currently configured cluster layout\n- Staged changes to the cluster layout\n\n*Capacity is given in bytes*\n ",
"operationId": "GetClusterStatus",
"responses": {
"200": {
"description": "Cluster status report",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetClusterStatusResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetKeyInfo": {
"get": {
"tags": [
"Access key"
],
"description": "\nReturn information about a specific key like its identifiers, its permissions and buckets on which it has permissions.\nYou can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`).\n\nFor confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it.\n ",
"operationId": "GetKeyInfo",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Access key ID",
"required": true,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "search",
"in": "path",
"description": "Partial key ID or name to search for",
"required": true,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "showSecretKey",
"in": "path",
"description": "Whether to return the secret access key",
"required": true,
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "Information about the access key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetKeyInfoResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetNodeInfo": {
"get": {
"tags": [
"Node"
],
"description": "\nReturn information about the Garage daemon running on one or several nodes.\n ",
"operationId": "GetNodeInfo",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalGetNodeInfoResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetNodeStatistics": {
"get": {
"tags": [
"Node"
],
"description": "\nFetch statistics for one or several Garage nodes.\n\n*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.*\n ",
"operationId": "GetNodeStatistics",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalGetNodeStatisticsResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetWorkerInfo": {
"post": {
"tags": [
"Worker"
],
"description": "\nGet information about the specified background worker on one or several cluster nodes.\n ",
"operationId": "GetWorkerInfo",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LocalGetWorkerInfoRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalGetWorkerInfoResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/GetWorkerVariable": {
"post": {
"tags": [
"Worker"
],
"description": "\nFetch values of one or several worker variables, from one or several cluster nodes.\n ",
"operationId": "GetWorkerVariable",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LocalGetWorkerVariableRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalGetWorkerVariableResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ImportKey": {
"post": {
"tags": [
"Access key"
],
"description": "\nImports an existing API key. This feature must only be used for migrations and backup restore.\n\n**Do not use it to generate custom key identifiers or you will break your Garage cluster.**\n ",
"operationId": "ImportKey",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ImportKeyRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Access key has been imported",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ImportKeyResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/InspectObject": {
"get": {
"tags": [
"Bucket"
],
"description": "\nReturns detailed information about an object in a bucket, including its internal state in Garage.\n\nThis API call can be used to list the data blocks referenced by an object,\nas well as to view metadata associated to the object.\n\nThis call may return a list of more than one version for the object, for instance in the\ncase where there is a currently stored version of the object, and a newer version whose\nupload is in progress and not yet finished.\n ",
"operationId": "InspectObject",
"parameters": [
{
"name": "bucketId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "key",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns exhaustive information about the object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InspectObjectResponse"
}
}
}
},
"404": {
"description": "Object not found"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/LaunchRepairOperation": {
"post": {
"tags": [
"Node"
],
"description": "\nLaunch a repair operation on one or several cluster nodes.\n ",
"operationId": "LaunchRepairOperation",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LocalLaunchRepairOperationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalLaunchRepairOperationResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ListAdminTokens": {
"get": {
"tags": [
"Admin API token"
],
"description": "Returns all admin API tokens in the cluster.",
"operationId": "ListAdminTokens",
"responses": {
"200": {
"description": "Returns info about all admin API tokens",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListAdminTokensResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ListBlockErrors": {
"get": {
"tags": [
"Block"
],
"description": "\nList data blocks that are currently in an errored state on one or several Garage nodes.\n ",
"operationId": "ListBlockErrors",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalListBlockErrorsResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ListBuckets": {
"get": {
"tags": [
"Bucket"
],
"description": "List all the buckets on the cluster with their UUID and their global and local aliases.",
"operationId": "ListBuckets",
"responses": {
"200": {
"description": "Returns the UUID of all the buckets and all their aliases",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListBucketsResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ListKeys": {
"get": {
"tags": [
"Access key"
],
"description": "Returns all API access keys in the cluster.",
"operationId": "ListKeys",
"responses": {
"200": {
"description": "Returns the key identifier (aka `AWS_ACCESS_KEY_ID`) and its associated, human friendly, name if any (otherwise return an empty string)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListKeysResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/ListWorkers": {
"post": {
"tags": [
"Worker"
],
"description": "\nList background workers currently running on one or several cluster nodes.\n ",
"operationId": "ListWorkers",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LocalListWorkersRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalListWorkersResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/PreviewClusterLayoutChanges": {
"post": {
"tags": [
"Cluster layout"
],
"description": "\nComputes a new layout taking into account the staged parameters, and returns it with detailed statistics. The new layout is not applied in the cluster.\n\n*Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*\n ",
"operationId": "PreviewClusterLayoutChanges",
"responses": {
"200": {
"description": "Information about the new layout",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PreviewClusterLayoutChangesResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/PurgeBlocks": {
"post": {
"tags": [
"Block"
],
"description": "\nPurge references to one or several missing data blocks.\n\nThis will remove all objects and in-progress multipart uploads that contain the specified data block(s). The objects will be permanently deleted from the buckets in which they appear. Use with caution.\n ",
"operationId": "PurgeBlocks",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LocalPurgeBlocksRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalPurgeBlocksResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/RemoveBucketAlias": {
"post": {
"tags": [
"Bucket alias"
],
"description": "Remove an alias for the target bucket. This can be either a global or a local alias, depending on which fields are specified.",
"operationId": "RemoveBucketAlias",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RemoveBucketAliasRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Returns exhaustive information about the bucket",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RemoveBucketAliasResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/RetryBlockResync": {
"post": {
"tags": [
"Block"
],
"description": "\nInstruct Garage node(s) to retry the resynchronization of one or several missing data block(s).\n ",
"operationId": "RetryBlockResync",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LocalRetryBlockResyncRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalRetryBlockResyncResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/RevertClusterLayout": {
"post": {
"tags": [
"Cluster layout"
],
"description": "Clear staged layout changes",
"operationId": "RevertClusterLayout",
"responses": {
"200": {
"description": "All pending changes to the cluster layout have been erased",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RevertClusterLayoutResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/SetWorkerVariable": {
"post": {
"tags": [
"Worker"
],
"description": "\nSet the value for a worker variable, on one or several cluster nodes.\n ",
"operationId": "SetWorkerVariable",
"parameters": [
{
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LocalSetWorkerVariableRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Responses from individual cluster nodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultiResponse_LocalSetWorkerVariableResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/UpdateAdminToken": {
"post": {
"tags": [
"Admin API token"
],
"description": "\nUpdates information about the specified admin API token.\n ",
"operationId": "UpdateAdminToken",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Admin API token ID",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateAdminTokenRequestBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Admin token has been updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateAdminTokenResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/UpdateBucket": {
"post": {
"tags": [
"Bucket"
],
"description": "\nAll fields (`websiteAccess` and `quotas`) are optional.\nIf they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed.\n\nIn `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified.\nThe field `errorDocument` is optional, if no error document is set a generic\nerror message is displayed when errors happen. Conversely, if `enabled` is\n`false`, neither `indexDocument` nor `errorDocument` must be specified.\n\nIn `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null`\nto remove the quotas. An absent value will be considered the same as a `null`. It is not possible\nto change only one of the two quotas.\n ",
"operationId": "UpdateBucket",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the bucket to update",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateBucketRequestBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Bucket has been updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateBucketResponse"
}
}
}
},
"404": {
"description": "Bucket not found"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/UpdateClusterLayout": {
"post": {
"tags": [
"Cluster layout"
],
"description": "\nSend 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.\n\nSetting the capacity to `null` will configure the node as a gateway.\nOtherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights).\nFor example to declare 100GB, you must set `capacity: 100000000000`.\n\nGarage 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).\n ",
"operationId": "UpdateClusterLayout",
"requestBody": {
"description": "\nTo add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`).\nTo remove a node, simply pass the `remove: true` field.\nThis logic is represented in OpenAPI with a 'One Of' object.\n\nContrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified.\n ",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateClusterLayoutRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Proposed changes have been added to the list of pending changes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateClusterLayoutResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/v2/UpdateKey": {
"post": {
"tags": [
"Access key"
],
"description": "\nUpdates information about the specified API access key.\n\n*Note: the secret key is not returned in the response, `null` is sent instead.*\n ",
"operationId": "UpdateKey",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Access key ID",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateKeyRequestBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Access key has been updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateKeyResponse"
}
}
}
},
"500": {
"description": "Internal server error"
}
}
}
}
},
"components": {
"schemas": {
"AddBucketAliasRequest": {
"allOf": [
{
"$ref": "#/components/schemas/BucketAliasEnum"
},
{
"type": "object",
"required": [
"bucketId"
],
"properties": {
"bucketId": {
"type": "string"
}
}
}
]
},
"AddBucketAliasResponse": {
"$ref": "#/components/schemas/GetBucketInfoResponse"
},
"AllowBucketKeyRequest": {
"$ref": "#/components/schemas/BucketKeyPermChangeRequest"
},
"AllowBucketKeyResponse": {
"$ref": "#/components/schemas/GetBucketInfoResponse"
},
"ApiBucketKeyPerm": {
"type": "object",
"properties": {
"owner": {
"type": "boolean"
},
"read": {
"type": "boolean"
},
"write": {
"type": "boolean"
}
}
},
"ApiBucketQuotas": {
"type": "object",
"properties": {
"maxObjects": {
"type": [
"integer",
"null"
],
"format": "int64",
"minimum": 0
},
"maxSize": {
"type": [
"integer",
"null"
],
"format": "int64",
"minimum": 0
}
}
},
"ApplyClusterLayoutRequest": {
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"type": "integer",
"format": "int64",
"description": "As a safety measure, the new version number of the layout must\nbe specified here",
"minimum": 0
}
}
},
"ApplyClusterLayoutResponse": {
"type": "object",
"required": [
"message",
"layout"
],
"properties": {
"layout": {
"$ref": "#/components/schemas/GetClusterLayoutResponse",
"description": "Details about the new cluster layout"
},
"message": {
"type": "array",
"items": {
"type": "string"
},
"description": "Plain-text information about the layout computation\n(do not try to parse this)"
}
}
},
"BlockError": {
"type": "object",
"required": [
"blockHash",
"refcount",
"errorCount",
"lastTrySecsAgo",
"nextTryInSecs"
],
"properties": {
"blockHash": {
"type": "string"
},
"errorCount": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"lastTrySecsAgo": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"nextTryInSecs": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"refcount": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"BlockVersion": {
"type": "object",
"required": [
"versionId",
"refDeleted",
"versionDeleted",
"garbageCollected"
],
"properties": {
"backlink": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/BlockVersionBacklink"
}
]
},
"garbageCollected": {
"type": "boolean"
},
"refDeleted": {
"type": "boolean"
},
"versionDeleted": {
"type": "boolean"
},
"versionId": {
"type": "string"
}
}
},
"BlockVersionBacklink": {
"oneOf": [
{
"type": "object",
"required": [
"object"
],
"properties": {
"object": {
"type": "object",
"required": [
"bucketId",
"key"
],
"properties": {
"bucketId": {
"type": "string"
},
"key": {
"type": "string"
}
}
}
}
},
{
"type": "object",
"required": [
"upload"
],
"properties": {
"upload": {
"type": "object",
"required": [
"uploadId",
"uploadDeleted",
"uploadGarbageCollected"
],
"properties": {
"bucketId": {
"type": [
"string",
"null"
]
},
"key": {
"type": [
"string",
"null"
]
},
"uploadDeleted": {
"type": "boolean"
},
"uploadGarbageCollected": {
"type": "boolean"
},
"uploadId": {
"type": "string"
}
}
}
}
}
]
},
"BucketAliasEnum": {
"oneOf": [
{
"type": "object",
"required": [
"globalAlias"
],
"properties": {
"globalAlias": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"localAlias",
"accessKeyId"
],
"properties": {
"accessKeyId": {
"type": "string"
},
"localAlias": {
"type": "string"
}
}
}
]
},
"BucketKeyPermChangeRequest": {
"type": "object",
"required": [
"bucketId",
"accessKeyId",
"permissions"
],
"properties": {
"accessKeyId": {
"type": "string"
},
"bucketId": {
"type": "string"
},
"permissions": {
"$ref": "#/components/schemas/ApiBucketKeyPerm"
}
}
},
"BucketLocalAlias": {
"type": "object",
"required": [
"accessKeyId",
"alias"
],
"properties": {
"accessKeyId": {
"type": "string"
},
"alias": {
"type": "string"
}
}
},
"CleanupIncompleteUploadsRequest": {
"type": "object",
"required": [
"bucketId",
"olderThanSecs"
],
"properties": {
"bucketId": {
"type": "string"
},
"olderThanSecs": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"CleanupIncompleteUploadsResponse": {
"type": "object",
"required": [
"uploadsDeleted"
],
"properties": {
"uploadsDeleted": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"ClusterLayoutSkipDeadNodesRequest": {
"type": "object",
"required": [
"version",
"allowMissingData"
],
"properties": {
"allowMissingData": {
"type": "boolean",
"description": "Allow the skip even if a quorum of nodes could not be found for\nthe data among the remaining nodes"
},
"version": {
"type": "integer",
"format": "int64",
"description": "Version number of the layout to assume is currently up-to-date.\nThis will generally be the current layout version.",
"minimum": 0
}
}
},
"ClusterLayoutSkipDeadNodesResponse": {
"type": "object",
"required": [
"ackUpdated",
"syncUpdated"
],
"properties": {
"ackUpdated": {
"type": "array",
"items": {
"type": "string"
},
"description": "Nodes for which the ACK update tracker has been updated to `version`"
},
"syncUpdated": {
"type": "array",
"items": {
"type": "string"
},
"description": "If `allow_missing_data` is set,\nnodes for which the SYNC update tracker has been updated to `version`"
}
}
},
"ClusterLayoutVersion": {
"type": "object",
"required": [
"version",
"status",
"storageNodes",
"gatewayNodes"
],
"properties": {
"gatewayNodes": {
"type": "integer",
"format": "int64",
"description": "Number of nodes with a gateway role in this layout version",
"minimum": 0
},
"status": {
"$ref": "#/components/schemas/ClusterLayoutVersionStatus",
"description": "Status of this layout version"
},
"storageNodes": {
"type": "integer",
"format": "int64",
"description": "Number of nodes with an assigned storage capacity in this layout version",
"minimum": 0
},
"version": {
"type": "integer",
"format": "int64",
"description": "Version number of this layout version",
"minimum": 0
}
}
},
"ClusterLayoutVersionStatus": {
"type": "string",
"enum": [
"Current",
"Draining",
"Historical"
]
},
"ConnectClusterNodesRequest": {
"type": "array",
"items": {
"type": "string"
}
},
"ConnectClusterNodesResponse": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConnectNodeResponse"
}
},
"ConnectNodeResponse": {
"type": "object",
"required": [
"success"
],
"properties": {
"error": {
"type": [
"string",
"null"
],
"description": "An error message if Garage did not manage to connect to this node"
},
"success": {
"type": "boolean",
"description": "`true` if Garage managed to connect to this node"
}
}
},
"CreateAdminTokenResponse": {
"allOf": [
{
"$ref": "#/components/schemas/GetAdminTokenInfoResponse"
},
{
"type": "object",
"required": [
"secretToken"
],
"properties": {
"secretToken": {
"type": "string",
"description": "The secret bearer token. **CAUTION:** This token will be shown only\nONCE, so this value MUST be remembered somewhere, or the token\nwill be unusable."
}
}
}
]
},
"CreateBucketLocalAlias": {
"type": "object",
"required": [
"accessKeyId",
"alias"
],
"properties": {
"accessKeyId": {
"type": "string"
},
"alias": {
"type": "string"
},
"allow": {
"$ref": "#/components/schemas/ApiBucketKeyPerm"
}
}
},
"CreateBucketRequest": {
"type": "object",
"properties": {
"globalAlias": {
"type": [
"string",
"null"
]
},
"localAlias": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/CreateBucketLocalAlias"
}
]
}
}
},
"CreateBucketResponse": {
"$ref": "#/components/schemas/GetBucketInfoResponse"
},
"CreateKeyRequest": {
"type": "object",
"properties": {
"name": {
"type": [
"string",
"null"
]
}
}
},
"CreateKeyResponse": {
"$ref": "#/components/schemas/GetKeyInfoResponse"
},
"DenyBucketKeyRequest": {
"$ref": "#/components/schemas/BucketKeyPermChangeRequest"
},
"DenyBucketKeyResponse": {
"$ref": "#/components/schemas/GetBucketInfoResponse"
},
"FreeSpaceResp": {
"type": "object",
"required": [
"available",
"total"
],
"properties": {
"available": {
"type": "integer",
"format": "int64",
"description": "Number of bytes available",
"minimum": 0
},
"total": {
"type": "integer",
"format": "int64",
"description": "Total number of bytes",
"minimum": 0
}
}
},
"GetAdminTokenInfoResponse": {
"type": "object",
"required": [
"name",
"expired",
"scope"
],
"properties": {
"created": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Creation date"
},
"expiration": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Expiration time and date, formatted according to RFC 3339"
},
"expired": {
"type": "boolean",
"description": "Whether this admin token is expired already"
},
"id": {
"type": [
"string",
"null"
],
"description": "Identifier of the admin token (which is also a prefix of the full bearer token)"
},
"name": {
"type": "string",
"description": "Name of the admin API token"
},
"scope": {
"type": "array",
"items": {
"type": "string"
},
"description": "Scope of the admin API token, a list of admin endpoint names (such as\n`GetClusterStatus`, etc), or the special value `*` to allow all\nadmin endpoints"
}
}
},
"GetBucketInfoKey": {
"type": "object",
"required": [
"accessKeyId",
"name",
"permissions",
"bucketLocalAliases"
],
"properties": {
"accessKeyId": {
"type": "string"
},
"bucketLocalAliases": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"permissions": {
"$ref": "#/components/schemas/ApiBucketKeyPerm"
}
}
},
"GetBucketInfoResponse": {
"type": "object",
"required": [
"id",
"globalAliases",
"websiteAccess",
"keys",
"objects",
"bytes",
"unfinishedUploads",
"unfinishedMultipartUploads",
"unfinishedMultipartUploadParts",
"unfinishedMultipartUploadBytes",
"quotas"
],
"properties": {
"bytes": {
"type": "integer",
"format": "int64",
"description": "Total number of bytes used by objects in this bucket"
},
"globalAliases": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of global aliases for this bucket"
},
"id": {
"type": "string",
"description": "Identifier of the bucket"
},
"keys": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GetBucketInfoKey"
},
"description": "List of access keys that have permissions granted on this bucket"
},
"objects": {
"type": "integer",
"format": "int64",
"description": "Number of objects in this bucket"
},
"quotas": {
"$ref": "#/components/schemas/ApiBucketQuotas",
"description": "Quotas that apply to this bucket"
},
"unfinishedMultipartUploadBytes": {
"type": "integer",
"format": "int64",
"description": "Total number of bytes used by unfinished multipart uploads in this bucket"
},
"unfinishedMultipartUploadParts": {
"type": "integer",
"format": "int64",
"description": "Number of parts in unfinished multipart uploads in this bucket"
},
"unfinishedMultipartUploads": {
"type": "integer",
"format": "int64",
"description": "Number of unfinished multipart uploads in this bucket"
},
"unfinishedUploads": {
"type": "integer",
"format": "int64",
"description": "Number of unfinished uploads in this bucket"
},
"websiteAccess": {
"type": "boolean",
"description": "Whether website acces is enabled for this bucket"
},
"websiteConfig": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/GetBucketInfoWebsiteResponse",
"description": "Website configuration for this bucket"
}
]
}
}
},
"GetBucketInfoWebsiteResponse": {
"type": "object",
"required": [
"indexDocument"
],
"properties": {
"errorDocument": {
"type": [
"string",
"null"
]
},
"indexDocument": {
"type": "string"
}
}
},
"GetClusterHealthResponse": {
"type": "object",
"required": [
"status",
"knownNodes",
"connectedNodes",
"storageNodes",
"storageNodesOk",
"partitions",
"partitionsQuorum",
"partitionsAllOk"
],
"properties": {
"connectedNodes": {
"type": "integer",
"description": "the nubmer of nodes this Garage node currently has an open connection to",
"minimum": 0
},
"knownNodes": {
"type": "integer",
"description": "the number of nodes this Garage node has had a TCP connection to since the daemon started",
"minimum": 0
},
"partitions": {
"type": "integer",
"description": "the total number of partitions of the data (currently always 256)",
"minimum": 0
},
"partitionsAllOk": {
"type": "integer",
"description": "the number of partitions for which we are connected to all storage nodes responsible of storing it",
"minimum": 0
},
"partitionsQuorum": {
"type": "integer",
"description": "the number of partitions for which a quorum of write nodes is available",
"minimum": 0
},
"status": {
"type": "string",
"description": "One of `healthy`, `degraded` or `unavailable`:\n- `healthy`: Garage node is connected to all storage nodes\n- `degraded`: Garage node is not connected to all storage nodes, but a quorum of write nodes is available for all partitions\n- `unavailable`: a quorum of write nodes is not available for some partitions"
},
"storageNodes": {
"type": "integer",
"description": "the number of storage nodes currently registered in the cluster layout",
"minimum": 0
},
"storageNodesOk": {
"type": "integer",
"description": "the number of storage nodes to which a connection is currently open",
"minimum": 0
}
}
},
"GetClusterLayoutHistoryResponse": {
"type": "object",
"required": [
"currentVersion",
"minAck",
"versions"
],
"properties": {
"currentVersion": {
"type": "integer",
"format": "int64",
"description": "The current version number of the cluster layout",
"minimum": 0
},
"minAck": {
"type": "integer",
"format": "int64",
"description": "All nodes in the cluster are aware of layout versions up to\nthis version number (at least)",
"minimum": 0
},
"updateTrackers": {
"type": [
"object",
"null"
],
"description": "Detailed update trackers for nodes (see\n`https://garagehq.deuxfleurs.fr/blog/2023-12-preserving-read-after-write-consistency/`)",
"additionalProperties": {
"$ref": "#/components/schemas/NodeUpdateTrackers"
},
"propertyNames": {
"type": "string"
}
},
"versions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ClusterLayoutVersion"
},
"description": "Layout version history"
}
}
},
"GetClusterLayoutResponse": {
"type": "object",
"required": [
"version",
"roles",
"parameters",
"partitionSize",
"stagedRoleChanges"
],
"properties": {
"parameters": {
"$ref": "#/components/schemas/LayoutParameters",
"description": "Layout parameters used when the current layout was computed"
},
"partitionSize": {
"type": "integer",
"format": "int64",
"description": "The size, in bytes, of one Garage partition (= a shard)",
"minimum": 0
},
"roles": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LayoutNodeRole"
},
"description": "List of nodes that currently have a role in the cluster layout"
},
"stagedParameters": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/LayoutParameters",
"description": "Layout parameters to use when computing the next version of\nthe cluster layout"
}
]
},
"stagedRoleChanges": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NodeRoleChange"
},
"description": "List of nodes that will have a new role or whose role will be\nremoved in the next version of the cluster layout"
},
"version": {
"type": "integer",
"format": "int64",
"description": "The current version number of the cluster layout",
"minimum": 0
}
}
},
"GetClusterStatisticsResponse": {
"type": "object",
"required": [
"freeform"
],
"properties": {
"freeform": {
"type": "string"
}
}
},
"GetClusterStatusResponse": {
"type": "object",
"required": [
"layoutVersion",
"nodes"
],
"properties": {
"layoutVersion": {
"type": "integer",
"format": "int64",
"description": "Current version number of the cluster layout",
"minimum": 0
},
"nodes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NodeResp"
},
"description": "List of nodes that are either currently connected, part of the\ncurrent cluster layout, or part of an older cluster layout that\nis still active in the cluster (being drained)."
}
}
},
"GetKeyInfoResponse": {
"type": "object",
"required": [
"name",
"accessKeyId",
"permissions",
"buckets"
],
"properties": {
"accessKeyId": {
"type": "string"
},
"buckets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/KeyInfoBucketResponse"
}
},
"name": {
"type": "string"
},
"permissions": {
"$ref": "#/components/schemas/KeyPerm"
},
"secretAccessKey": {
"type": [
"string",
"null"
]
}
}
},
"ImportKeyRequest": {
"type": "object",
"required": [
"accessKeyId",
"secretAccessKey"
],
"properties": {
"accessKeyId": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"secretAccessKey": {
"type": "string"
}
}
},
"ImportKeyResponse": {
"$ref": "#/components/schemas/GetKeyInfoResponse"
},
"InspectObjectBlock": {
"type": "object",
"required": [
"partNumber",
"offset",
"hash",
"size"
],
"properties": {
"hash": {
"type": "string",
"description": "Hash (blake2 sum) of the block's data"
},
"offset": {
"type": "integer",
"format": "int64",
"description": "Offset of this block within the part",
"minimum": 0
},
"partNumber": {
"type": "integer",
"format": "int64",
"description": "Part number of the part containing this block, for multipart uploads",
"minimum": 0
},
"size": {
"type": "integer",
"format": "int64",
"description": "Length of the blocks's data",
"minimum": 0
}
}
},
"InspectObjectResponse": {
"type": "object",
"required": [
"bucketId",
"key",
"versions"
],
"properties": {
"bucketId": {
"type": "string",
"description": "ID of the bucket containing the inspected object"
},
"key": {
"type": "string",
"description": "Key of the inspected object"
},
"versions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InspectObjectVersion"
},
"description": "List of versions currently stored for this object"
}
}
},
"InspectObjectVersion": {
"type": "object",
"required": [
"uuid",
"timestamp",
"encrypted",
"uploading",
"aborted",
"deleteMarker",
"inline"
],
"properties": {
"aborted": {
"type": "boolean",
"description": "Whether this is an aborted upload"
},
"blocks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InspectObjectBlock"
},
"description": "List of data blocks for this object version"
},
"deleteMarker": {
"type": "boolean",
"description": "Whether this version is a delete marker (a tombstone indicating that a previous version of\nthe object has been deleted)"
},
"encrypted": {
"type": "boolean",
"description": "Whether this object version was created with SSE-C encryption"
},
"etag": {
"type": [
"string",
"null"
],
"description": "Etag of this object version"
},
"headers": {
"type": "array",
"items": {
"type": "array",
"items": false,
"prefixItems": [
{
"type": "string"
},
{
"type": "string"
}
]
},
"description": "Metadata (HTTP headers) associated with this object version"
},
"inline": {
"type": "boolean",
"description": "Whether the object's data is stored inline (for small objects)"
},
"size": {
"type": [
"integer",
"null"
],
"format": "int64",
"description": "Size of the object, in bytes",
"minimum": 0
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp of this object version"
},
"uploading": {
"type": "boolean",
"description": "Whether this object version is still uploading"
},
"uuid": {
"type": "string",
"description": "Version ID"
}
}
},
"KeyInfoBucketResponse": {
"type": "object",
"required": [
"id",
"globalAliases",
"localAliases",
"permissions"
],
"properties": {
"globalAliases": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string"
},
"localAliases": {
"type": "array",
"items": {
"type": "string"
}
},
"permissions": {
"$ref": "#/components/schemas/ApiBucketKeyPerm"
}
}
},
"KeyPerm": {
"type": "object",
"properties": {
"createBucket": {
"type": "boolean"
}
}
},
"LayoutNodeRole": {
"type": "object",
"required": [
"id",
"zone",
"tags"
],
"properties": {
"capacity": {
"type": [
"integer",
"null"
],
"format": "int64",
"description": "Capacity (in bytes) assigned by the cluster administrator,\nabsent for gateway nodes",
"minimum": 0
},
"id": {
"type": "string",
"description": "Identifier of the node"
},
"storedPartitions": {
"type": [
"integer",
"null"
],
"format": "int64",
"description": "Number of partitions stored on this node\n(a result of the layout computation)",
"minimum": 0
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of tags assigned by the cluster administrator"
},
"usableCapacity": {
"type": [
"integer",
"null"
],
"format": "int64",
"description": "Capacity (in bytes) that is actually usable on this node in the current\nlayout, which is equal to `stored_partitions` × `partition_size`",
"minimum": 0
},
"zone": {
"type": "string",
"description": "Zone name assigned by the cluster administrator"
}
}
},
"LayoutParameters": {
"type": "object",
"required": [
"zoneRedundancy"
],
"properties": {
"zoneRedundancy": {
"$ref": "#/components/schemas/ZoneRedundancy",
"description": "Minimum number of zones in which a data partition must be replicated"
}
}
},
"ListAdminTokensResponse": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GetAdminTokenInfoResponse"
}
},
"ListBucketsResponse": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ListBucketsResponseItem"
}
},
"ListBucketsResponseItem": {
"type": "object",
"required": [
"id",
"globalAliases",
"localAliases"
],
"properties": {
"globalAliases": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string"
},
"localAliases": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BucketLocalAlias"
}
}
}
},
"ListKeysResponse": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ListKeysResponseItem"
}
},
"ListKeysResponseItem": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"LocalCreateMetadataSnapshotResponse": {
"default": null
},
"LocalGetBlockInfoRequest": {
"type": "object",
"required": [
"blockHash"
],
"properties": {
"blockHash": {
"type": "string"
}
}
},
"LocalGetBlockInfoResponse": {
"type": "object",
"required": [
"blockHash",
"refcount",
"versions"
],
"properties": {
"blockHash": {
"type": "string"
},
"refcount": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"versions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BlockVersion"
}
}
}
},
"LocalGetNodeInfoResponse": {
"type": "object",
"required": [
"nodeId",
"garageVersion",
"rustVersion",
"dbEngine"
],
"properties": {
"dbEngine": {
"type": "string"
},
"garageFeatures": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"garageVersion": {
"type": "string"
},
"nodeId": {
"type": "string"
},
"rustVersion": {
"type": "string"
}
}
},
"LocalGetNodeStatisticsResponse": {
"type": "object",
"required": [
"freeform"
],
"properties": {
"freeform": {
"type": "string"
}
}
},
"LocalGetWorkerInfoRequest": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"LocalGetWorkerInfoResponse": {
"$ref": "#/components/schemas/WorkerInfoResp"
},
"LocalGetWorkerVariableRequest": {
"type": "object",
"properties": {
"variable": {
"type": [
"string",
"null"
]
}
}
},
"LocalGetWorkerVariableResponse": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"LocalLaunchRepairOperationRequest": {
"type": "object",
"required": [
"repairType"
],
"properties": {
"repairType": {
"$ref": "#/components/schemas/RepairType"
}
}
},
"LocalLaunchRepairOperationResponse": {
"default": null
},
"LocalListBlockErrorsResponse": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BlockError"
}
},
"LocalListWorkersRequest": {
"type": "object",
"properties": {
"busyOnly": {
"type": "boolean"
},
"errorOnly": {
"type": "boolean"
}
}
},
"LocalListWorkersResponse": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkerInfoResp"
}
},
"LocalPurgeBlocksRequest": {
"type": "array",
"items": {
"type": "string"
}
},
"LocalPurgeBlocksResponse": {
"type": "object",
"required": [
"blocksPurged",
"objectsDeleted",
"uploadsDeleted",
"versionsDeleted"
],
"properties": {
"blocksPurged": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"objectsDeleted": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"uploadsDeleted": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"versionsDeleted": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"LocalRetryBlockResyncRequest": {
"oneOf": [
{
"type": "object",
"required": [
"all"
],
"properties": {
"all": {
"type": "boolean"
}
}
},
{
"type": "object",
"required": [
"blockHashes"
],
"properties": {
"blockHashes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
]
},
"LocalRetryBlockResyncResponse": {
"type": "object",
"required": [
"count"
],
"properties": {
"count": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"LocalSetWorkerVariableRequest": {
"type": "object",
"required": [
"variable",
"value"
],
"properties": {
"value": {
"type": "string"
},
"variable": {
"type": "string"
}
}
},
"LocalSetWorkerVariableResponse": {
"type": "object",
"required": [
"variable",
"value"
],
"properties": {
"value": {
"type": "string"
},
"variable": {
"type": "string"
}
}
},
"MultiResponse_LocalCreateMetadataSnapshotResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"default": null
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalGetBlockInfoResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "object",
"required": [
"blockHash",
"refcount",
"versions"
],
"properties": {
"blockHash": {
"type": "string"
},
"refcount": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"versions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BlockVersion"
}
}
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalGetNodeInfoResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "object",
"required": [
"nodeId",
"garageVersion",
"rustVersion",
"dbEngine"
],
"properties": {
"dbEngine": {
"type": "string"
},
"garageFeatures": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"garageVersion": {
"type": "string"
},
"nodeId": {
"type": "string"
},
"rustVersion": {
"type": "string"
}
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalGetNodeStatisticsResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "object",
"required": [
"freeform"
],
"properties": {
"freeform": {
"type": "string"
}
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalGetWorkerInfoResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"$ref": "#/components/schemas/WorkerInfoResp"
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalGetWorkerVariableResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalLaunchRepairOperationResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"default": null
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalListBlockErrorsResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BlockError"
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalListWorkersResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkerInfoResp"
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalPurgeBlocksResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "object",
"required": [
"blocksPurged",
"objectsDeleted",
"uploadsDeleted",
"versionsDeleted"
],
"properties": {
"blocksPurged": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"objectsDeleted": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"uploadsDeleted": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"versionsDeleted": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalRetryBlockResyncResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "object",
"required": [
"count"
],
"properties": {
"count": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"MultiResponse_LocalSetWorkerVariableResponse": {
"type": "object",
"required": [
"success",
"error"
],
"properties": {
"error": {
"type": "object",
"description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
},
"success": {
"type": "object",
"description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
"additionalProperties": {
"type": "object",
"required": [
"variable",
"value"
],
"properties": {
"value": {
"type": "string"
},
"variable": {
"type": "string"
}
}
},
"propertyNames": {
"type": "string"
}
}
}
},
"NodeAssignedRole": {
"type": "object",
"required": [
"zone",
"tags"
],
"properties": {
"capacity": {
"type": [
"integer",
"null"
],
"format": "int64",
"description": "Capacity (in bytes) assigned by the cluster administrator,\nabsent for gateway nodes",
"minimum": 0
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of tags assigned by the cluster administrator"
},
"zone": {
"type": "string",
"description": "Zone name assigned by the cluster administrator"
}
}
},
"NodeResp": {
"type": "object",
"required": [
"id",
"isUp",
"draining"
],
"properties": {
"addr": {
"type": [
"string",
"null"
],
"description": "Socket address used by other nodes to connect to this node for RPC"
},
"dataPartition": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/FreeSpaceResp",
"description": "Total and available space on the disk partition(s) containing the data\ndirectory(ies)"
}
]
},
"draining": {
"type": "boolean",
"description": "Whether this node is part of an older layout version and is draining data."
},
"garageVersion": {
"type": [
"string",
"null"
],
"description": "Garage version"
},
"hostname": {
"type": [
"string",
"null"
],
"description": "Hostname of the node"
},
"id": {
"type": "string",
"description": "Full-length node identifier"
},
"isUp": {
"type": "boolean",
"description": "Whether this node is connected in the cluster"
},
"lastSeenSecsAgo": {
"type": [
"integer",
"null"
],
"format": "int64",
"description": "For disconnected nodes, the number of seconds since last contact,\nor `null` if no contact was established since Garage restarted.",
"minimum": 0
},
"metadataPartition": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/FreeSpaceResp",
"description": "Total and available space on the disk partition containing the\nmetadata directory"
}
]
},
"role": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/NodeAssignedRole",
"description": "Role assigned to this node in the current cluster layout"
}
]
}
}
},
"NodeRoleChange": {
"allOf": [
{
"$ref": "#/components/schemas/NodeRoleChangeEnum"
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "ID of the node for which this change applies"
}
}
}
]
},
"NodeRoleChangeEnum": {
"oneOf": [
{
"type": "object",
"required": [
"remove"
],
"properties": {
"remove": {
"type": "boolean",
"description": "Set `remove` to `true` to remove the node from the layout"
}
}
},
{
"$ref": "#/components/schemas/NodeAssignedRole"
}
]
},
"NodeUpdateTrackers": {
"type": "object",
"required": [
"ack",
"sync",
"syncAck"
],
"properties": {
"ack": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"sync": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"syncAck": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"PreviewClusterLayoutChangesResponse": {
"oneOf": [
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"description": "Error message indicating that the layout could not be computed\nwith the provided configuration"
}
}
},
{
"type": "object",
"required": [
"message",
"newLayout"
],
"properties": {
"message": {
"type": "array",
"items": {
"type": "string"
},
"description": "Plain-text information about the layout computation\n(do not try to parse this)"
},
"newLayout": {
"$ref": "#/components/schemas/GetClusterLayoutResponse",
"description": "Details about the new cluster layout"
}
}
}
]
},
"RemoveBucketAliasRequest": {
"allOf": [
{
"$ref": "#/components/schemas/BucketAliasEnum"
},
{
"type": "object",
"required": [
"bucketId"
],
"properties": {
"bucketId": {
"type": "string"
}
}
}
]
},
"RemoveBucketAliasResponse": {
"$ref": "#/components/schemas/GetBucketInfoResponse"
},
"RepairType": {
"oneOf": [
{
"type": "string",
"enum": [
"tables"
]
},
{
"type": "string",
"enum": [
"blocks"
]
},
{
"type": "string",
"enum": [
"versions"
]
},
{
"type": "string",
"enum": [
"multipartUploads"
]
},
{
"type": "string",
"enum": [
"blockRefs"
]
},
{
"type": "string",
"enum": [
"blockRc"
]
},
{
"type": "string",
"enum": [
"rebalance"
]
},
{
"type": "object",
"required": [
"scrub"
],
"properties": {
"scrub": {
"$ref": "#/components/schemas/ScrubCommand"
}
}
}
]
},
"RevertClusterLayoutResponse": {
"$ref": "#/components/schemas/GetClusterLayoutResponse"
},
"ScrubCommand": {
"type": "string",
"enum": [
"start",
"pause",
"resume",
"cancel"
]
},
"UpdateAdminTokenRequestBody": {
"type": "object",
"properties": {
"expiration": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Expiration time and date, formatted according to RFC 3339"
},
"name": {
"type": [
"string",
"null"
],
"description": "Name of the admin API token"
},
"scope": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"description": "Scope of the admin API token, a list of admin endpoint names (such as\n`GetClusterStatus`, etc), or the special value `*` to allow all\nadmin endpoints. **WARNING:** Granting a scope of `CreateAdminToken` or\n`UpdateAdminToken` trivially allows for privilege escalation, and is thus\nfunctionnally equivalent to granting a scope of `*`."
}
}
},
"UpdateAdminTokenResponse": {
"$ref": "#/components/schemas/GetAdminTokenInfoResponse"
},
"UpdateBucketRequestBody": {
"type": "object",
"properties": {
"quotas": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ApiBucketQuotas"
}
]
},
"websiteAccess": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/UpdateBucketWebsiteAccess"
}
]
}
}
},
"UpdateBucketResponse": {
"$ref": "#/components/schemas/GetBucketInfoResponse"
},
"UpdateBucketWebsiteAccess": {
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean"
},
"errorDocument": {
"type": [
"string",
"null"
]
},
"indexDocument": {
"type": [
"string",
"null"
]
}
}
},
"UpdateClusterLayoutRequest": {
"type": "object",
"properties": {
"parameters": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/LayoutParameters",
"description": "New layout computation parameters to use"
}
]
},
"roles": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NodeRoleChange"
},
"description": "New node roles to assign or remove in the cluster layout"
}
}
},
"UpdateClusterLayoutResponse": {
"$ref": "#/components/schemas/GetClusterLayoutResponse"
},
"UpdateKeyRequestBody": {
"type": "object",
"properties": {
"allow": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/KeyPerm"
}
]
},
"deny": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/KeyPerm"
}
]
},
"name": {
"type": [
"string",
"null"
]
}
}
},
"UpdateKeyResponse": {
"$ref": "#/components/schemas/GetKeyInfoResponse"
},
"WorkerInfoResp": {
"type": "object",
"required": [
"id",
"name",
"state",
"errors",
"consecutiveErrors",
"freeform"
],
"properties": {
"consecutiveErrors": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"errors": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"freeform": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"lastError": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WorkerLastError"
}
]
},
"name": {
"type": "string"
},
"persistentErrors": {
"type": [
"integer",
"null"
],
"format": "int64",
"minimum": 0
},
"progress": {
"type": [
"string",
"null"
]
},
"queueLength": {
"type": [
"integer",
"null"
],
"format": "int64",
"minimum": 0
},
"state": {
"$ref": "#/components/schemas/WorkerStateResp"
},
"tranquility": {
"type": [
"integer",
"null"
],
"format": "int32",
"minimum": 0
}
}
},
"WorkerLastError": {
"type": "object",
"required": [
"message",
"secsAgo"
],
"properties": {
"message": {
"type": "string"
},
"secsAgo": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"WorkerStateResp": {
"oneOf": [
{
"type": "string",
"enum": [
"busy"
]
},
{
"type": "object",
"required": [
"throttled"
],
"properties": {
"throttled": {
"type": "object",
"required": [
"durationSecs"
],
"properties": {
"durationSecs": {
"type": "number",
"format": "float"
}
}
}
}
},
{
"type": "string",
"enum": [
"idle"
]
},
{
"type": "string",
"enum": [
"done"
]
}
]
},
"ZoneRedundancy": {
"oneOf": [
{
"type": "object",
"description": "Partitions must be replicated in at least this number of\ndistinct zones.",
"required": [
"atLeast"
],
"properties": {
"atLeast": {
"type": "integer",
"description": "Partitions must be replicated in at least this number of\ndistinct zones.",
"minimum": 0
}
}
},
{
"type": "string",
"description": "Partitions must be replicated in as many zones as possible:\nas many zones as there are replicas, if there are enough distinct\nzones, or at least one in each zone otherwise.",
"enum": [
"maximum"
]
}
]
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
},
"security": [
{
"bearerAuth": []
}
]
}