{
  "openapi": "3.1.1",
  "info": {
    "title": "FlowPrime storage",
    "description": "Object storage for a FlowPrime organization: spaces, files, provider pools, quotas and usage. Tenant is resolved from the {org} subdomain or the X-Org-Slug header. An organization whose plan was cancelled answers 403 `{ error: \"tenant_cancelled\", error_description, status: \"cancelled\" }` on every route except its data export: GET under /v1/files (listing, metadata, by-name, content, signed URL), GET /v1/admin/spaces, GET /v1/usage and GET /v1/stats.",
    "version": "3.0.4-6869dfe"
  },
  "servers": [
    {
      "url": "https://{org}.storage.fastflow.tech",
      "description": "Tenant host. The org slug is also accepted as the X-Org-Slug header.",
      "variables": {
        "org": {
          "default": "your-org",
          "description": "Your FlowPrime organization slug"
        }
      }
    }
  ],
  "paths": {
    "/v1/tenants/provision": {
      "post": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/tenants/activate": {
      "post": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/tenants/deactivate": {
      "post": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/tenants/{orgSlug}": {
      "delete": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/databases": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health/live": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/login": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "returnUrl",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login_hint",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/callback": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/my-accounts": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/switch-account": {
      "post": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/logout": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/uploads/sweep": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Report (or remove) presigned-upload staging objects nothing will promote",
        "description": "Platform key only (`X-Api-Key`). Reads the file rows of every org and checks the staging key `{org}/_uploads/{fileId}/{fileName}` of each row older than Uploads:StagingSweep:OlderThanHours (48): a confirmed row whose staging object is still there counts as `leftoverStaged`, an unconfirmed row whose PUT stored bytes as `abandonedStaged`; `bytes` is their staged size. `dryRun` defaults to true and deletes nothing. `dryRun=false` deletes those staging objects only (never a row, never a served object) and is refused 409 `{ error: \"sweep_delete_disabled\" }` unless Uploads:StagingSweep:Delete is true. 400 `{ error: \"sweep_threshold_invalid\" }` when the threshold is not past the presigned PUT expiry. Answers `{ dryRun, orgs, leftoverStaged, abandonedStaged, bytes, deleted }`.",
        "parameters": [
          {
            "name": "dryRun",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/spaces/{slug}/usage": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/stats": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "space",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/stats": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "space",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/version.json": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/files": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Upload a file",
        "description": "multipart/form-data with a single `file` part. Rejected with 400 when the part is missing or empty, and 413 both above FFStorage:MaxFileSizeBytes (50 MB by default) and when the org is over its quota. Authenticates with an API key or a bearer token; the org comes from the {org} subdomain or X-Org-Slug. A storage backend that cannot be reached answers 503 with Retry-After and `{ error: \"provider_unavailable\", provider, reason }`, where `provider` is the pool entry's label and `reason` is unreachable, timeout or rejected - the same shape every /v1/files call uses for a backend failure. Two different conditions answer 404, and the body is what tells them apart: `{ error: \"tenant_not_provisioned\" }` means the org itself did not resolve here - it was never provisioned into this storage instance, or its data is not on the volume this instance runs against - so every read answers 404 too and retrying will not help; `{ error: \"Space not found\" }` means the org resolved and the named space does not exist in it. Read the body: a bare 404 status is not interpretable.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "collection",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "space",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/files/by-name": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collection",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/files/by-name/content": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collection",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/files/{id}": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/files/{id}/content": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/files/{id}/url": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiry",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 3600
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/files/upload-url": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Get a presigned URL to upload a file directly to the backend",
        "description": "JSON `{ fileName, sizeBytes, product?, collection?, contentType?, space? }`. `sizeBytes` is required and must be the size of the file in bytes: a missing or zero value answers 400. The declared size is checked against FFStorage:MaxFileSizeBytes (413) and the org, space and provider quotas (413) before the URL is handed out. PUT the bytes to `uploadUrl`, then call POST /v1/files/confirm with `fileId`. Answers 501 when the org's provider has no presigned uploads (the local provider).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadUrlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/files/confirm": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Confirm a presigned upload",
        "description": "JSON `{ fileId, sizeBytes? }`. The stored size is read from the backend, never taken from `sizeBytes`, which is ignored. 400 when the object was never uploaded. When the real size is over FFStorage:MaxFileSizeBytes, or what the confirm adds to the file's recorded size does not fit the org, space or provider quota, the call answers 409 `{ error: \"quota_exceeded\", limit, sizeBytes, usedBytes, limitBytes }`, where `limit` is max_file_size, org_quota, space_quota or provider_quota, and removes only the uploaded bytes (and the file, when it was never confirmed). An object no larger than the file's recorded size, including any zero-byte object, is never refused for a quota, even when the org is already over it. A file already confirmed keeps its content and size: a second PUT through its upload URL that does not fit is discarded, one that fits replaces the content. Confirming a file again is safe: an unchanged object is never removed. Confirms of one org are handled one at a time, so two confirms of the same file both answer 200 with the same size, and two files whose sizes together exceed a quota get exactly one 409.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/config": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Storage"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/usage": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "The organization's storage usage, with breakdowns",
        "description": "Counts every file the organization holds, on any provider, broken down by product, collection, space (null = outside any space) and provider (the built-in setting is the row with key \"builtin\"; each provider carries its cap and its files by space). The org quota covers only `hostedBytes`: files on the platform's own disk (the built-in setting or a `local` provider). A provider the organization brings is limited only by its own cap.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/files": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collection",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/providers": {
      "get": {
        "tags": [
          "Storage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Storage"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/providers/{id}": {
      "put": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/providers/{id}/default": {
      "put": {
        "tags": [
          "Storage"
        ],
        "description": "Makes the provider the default: the org's default space, which takes every upload that names no space, moves there with its files (the answer's `move`; poll GET /v1/admin/moves/{id}). Refused like a move.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/routing": {
      "get": {
        "tags": [
          "ProviderPoolEndpoints"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "ProviderPoolEndpoints"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/routing/{id}": {
      "delete": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/spaces": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Storage"
        ],
        "description": "Creates a space on one provider: `providerKey` \"builtin\" or a provider id, default the provider files with no space go to. Every upload into the space lands on that provider.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/spaces/{slug}": {
      "put": {
        "tags": [
          "Storage"
        ],
        "description": "Renames a space, changes its quota, or moves it: a new `providerKey` sends its new uploads there at once and starts a move of its stored files (answered as `move`; poll GET /v1/admin/moves/{id}). Refused like a move: 409 move_in_progress, 409 quota_exceeded, 409 provider_disabled.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSpaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/spaces/{slug}/keys": {
      "get": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/spaces/{slug}/keys/{id}": {
      "delete": {
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/moves": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Move a space, or everything on a provider, to another provider",
        "description": "Three moves, each onto `toProvider` (\"builtin\" or a provider id). `space` = a slug: that space moves whole, its files from wherever they are, and lives on the destination from then on. `space` omitted: everything on `fromProvider` moves, every space that lives there and its files with no space. `space` = \"\": only the files with no space on `fromProvider`. Each file is copied, checked, switched and its old copy deleted; ids never change. Runs in the background: 202 with the move; poll GET /v1/admin/moves/{id}. 409 move_in_progress while another move of the org runs, 409 quota_exceeded when the destination cannot hold the files (the org quota for the platform disk, or the provider's own cap), 409 provider_disabled.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "The organization's last 20 moves",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/moves/{id}": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "One move: its progress and every file that failed or was skipped",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ConfirmUploadRequest": {
        "required": [
          "fileId",
          "sizeBytes"
        ],
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "CreateProviderRequest": {
        "required": [
          "label",
          "type",
          "bucket",
          "region",
          "endpoint",
          "credentials"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "bucket": {
            "type": [
              "null",
              "string"
            ]
          },
          "region": {
            "type": [
              "null",
              "string"
            ]
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "credentials": {
            "type": [
              "null",
              "string"
            ]
          },
          "quotaBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64",
            "default": 0
          },
          "enabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "setDefault": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CreateSpaceRequest": {
        "required": [
          "slug",
          "name"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "quotaBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64",
            "default": 0
          },
          "providerKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MintKeyRequest": {
        "required": [
          "name",
          "scopes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "scopes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StartMoveRequest": {
        "required": [
          "fromProvider",
          "toProvider",
          "space"
        ],
        "type": "object",
        "properties": {
          "fromProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "toProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "space": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateConfigRequest": {
        "required": [
          "provider",
          "bucket",
          "region",
          "endpoint",
          "credentials"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "bucket": {
            "type": [
              "null",
              "string"
            ]
          },
          "region": {
            "type": [
              "null",
              "string"
            ]
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "credentials": {
            "type": [
              "null",
              "string"
            ]
          },
          "quotaBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64",
            "default": 0
          }
        }
      },
      "UpdateProviderRequest": {
        "required": [
          "label",
          "type",
          "bucket",
          "region",
          "endpoint",
          "credentials"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "bucket": {
            "type": [
              "null",
              "string"
            ]
          },
          "region": {
            "type": [
              "null",
              "string"
            ]
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "credentials": {
            "type": [
              "null",
              "string"
            ]
          },
          "quotaBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64",
            "default": 0
          },
          "enabled": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateSpaceRequest": {
        "required": [
          "name",
          "quotaBytes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "quotaBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "providerKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UploadUrlRequest": {
        "required": [
          "collection",
          "product",
          "fileName",
          "contentType",
          "sizeBytes"
        ],
        "type": "object",
        "properties": {
          "collection": {
            "type": [
              "null",
              "string"
            ]
          },
          "product": {
            "type": [
              "null",
              "string"
            ]
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "space": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Storage"
    },
    {
      "name": "ProviderPoolEndpoints"
    }
  ]
}