mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 09:20:21 -04:00
b01941275b
Updates JS sdk documentation following stable release.
Ran `make` in apps/docs/spec to regenerate tsdoc files.
**Details:**
- **Version:** `2.105.2`
- **Source:** `supabase-js-stable-release`
- **Changes:** Regenerated tsdoc files from latest spec files
🤖 Auto-generated from @supabase/supabase-js stable release.
Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
4025 lines
135 KiB
JSON
4025 lines
135 KiB
JSON
{
|
|
"openapi": "3.0.3",
|
|
"info": {
|
|
"title": "Supabase Storage API",
|
|
"description": "API documentation for Supabase Storage",
|
|
"version": "0.0.0"
|
|
},
|
|
"components": {
|
|
"securitySchemes": {
|
|
"bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "jwt" }
|
|
},
|
|
"schemas": {
|
|
"def-0": {
|
|
"type": "object",
|
|
"properties": {
|
|
"authorization": {
|
|
"type": "string",
|
|
"example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs"
|
|
}
|
|
},
|
|
"required": ["authorization"],
|
|
"title": "authSchema"
|
|
},
|
|
"def-1": {
|
|
"type": "object",
|
|
"properties": {
|
|
"statusCode": { "type": "string" },
|
|
"error": { "type": "string" },
|
|
"message": { "type": "string" }
|
|
},
|
|
"required": ["statusCode", "error", "message"],
|
|
"title": "errorSchema"
|
|
},
|
|
"def-2": {
|
|
"type": "object",
|
|
"properties": {
|
|
"filter": {
|
|
"type": "object",
|
|
"description": "Boolean filter expression. Supports field operators ($eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $exists) and logical operators ($and, $or) with arbitrary nesting.",
|
|
"additionalProperties": true
|
|
},
|
|
"indexArn": { "type": "string" },
|
|
"indexName": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 45,
|
|
"pattern": "^[a-z0-9](?:[a-z0-9.-]{1,61})?[a-z0-9]$"
|
|
},
|
|
"queryVector": {
|
|
"type": "object",
|
|
"properties": { "float32": { "type": "array", "items": { "type": "number" } } },
|
|
"required": ["float32"],
|
|
"additionalProperties": false
|
|
},
|
|
"returnDistance": { "type": "boolean" },
|
|
"returnMetadata": { "type": "boolean" },
|
|
"topK": { "type": "number" },
|
|
"vectorBucketName": { "type": "string" }
|
|
},
|
|
"required": ["vectorBucketName", "indexName", "queryVector", "topK"],
|
|
"additionalProperties": false,
|
|
"title": "queryVectorBodyDoc"
|
|
}
|
|
}
|
|
},
|
|
"paths": {
|
|
"/upload/resumable/": {
|
|
"post": {
|
|
"summary": "Handle POST request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"options": {
|
|
"summary": "Handle OPTIONS request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"description": "Handle OPTIONS request for TUS Resumable uploads",
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/upload/resumable/{*}": {
|
|
"post": {
|
|
"summary": "Handle POST request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"put": {
|
|
"summary": "Handle PUT request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"patch": {
|
|
"summary": "Handle PATCH request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"summary": "Handle HEAD request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"delete": {
|
|
"summary": "Handle DELETE request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"options": {
|
|
"summary": "Handle OPTIONS request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"description": "Handle OPTIONS request for TUS Resumable uploads",
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/upload/resumable/sign/": {
|
|
"post": {
|
|
"summary": "Handle POST request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"options": {
|
|
"summary": "Handle OPTIONS request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"description": "Handle OPTIONS request for TUS Resumable uploads",
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/upload/resumable/sign/{*}": {
|
|
"post": {
|
|
"summary": "Handle POST request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"put": {
|
|
"summary": "Handle PUT request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"patch": {
|
|
"summary": "Handle PATCH request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"summary": "Handle HEAD request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"delete": {
|
|
"summary": "Handle DELETE request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"options": {
|
|
"summary": "Handle OPTIONS request for TUS Resumable uploads",
|
|
"tags": ["resumable"],
|
|
"description": "Handle OPTIONS request for TUS Resumable uploads",
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/bucket/": {
|
|
"post": {
|
|
"summary": "Create a bucket",
|
|
"tags": ["bucket"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "example": "avatars" },
|
|
"id": { "type": "string", "example": "avatars" },
|
|
"public": { "type": "boolean", "example": false },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": {
|
|
"anyOf": [
|
|
{ "type": "integer", "examples": [1000], "nullable": true, "minimum": 0 },
|
|
{ "type": "string", "examples": ["100MB"], "nullable": true }
|
|
]
|
|
},
|
|
"allowed_mime_types": {
|
|
"type": "array",
|
|
"nullable": true,
|
|
"items": { "type": "string" },
|
|
"example": ["image/png", "image/jpg"]
|
|
}
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": { "name": { "type": "string", "example": "avatars" } },
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"summary": "Gets all buckets",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 1 },
|
|
"example": 10,
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 0,
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["id", "name", "created_at", "updated_at"] },
|
|
"in": "query",
|
|
"name": "sortColumn",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["asc", "desc"] },
|
|
"in": "query",
|
|
"name": "sortOrder",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "my-bucket",
|
|
"in": "query",
|
|
"name": "search",
|
|
"required": false
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"public": { "type": "boolean" },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": { "type": ["null", "integer"] },
|
|
"allowed_mime_types": {
|
|
"type": ["null", "array"],
|
|
"items": { "type": "string" }
|
|
},
|
|
"created_at": { "type": "string" },
|
|
"updated_at": { "type": "string" }
|
|
},
|
|
"required": ["id", "name"],
|
|
"additionalProperties": false,
|
|
"title": "bucketSchema",
|
|
"example": {
|
|
"id": "bucket2",
|
|
"name": "bucket2",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
}
|
|
},
|
|
"example": [
|
|
{
|
|
"id": "avatars",
|
|
"type": "STANDARD",
|
|
"name": "avatars",
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Gets all buckets",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 1 },
|
|
"example": 10,
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 0,
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["id", "name", "created_at", "updated_at"] },
|
|
"in": "query",
|
|
"name": "sortColumn",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["asc", "desc"] },
|
|
"in": "query",
|
|
"name": "sortOrder",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "my-bucket",
|
|
"in": "query",
|
|
"name": "search",
|
|
"required": false
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"public": { "type": "boolean" },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": { "type": ["null", "integer"] },
|
|
"allowed_mime_types": {
|
|
"type": ["null", "array"],
|
|
"items": { "type": "string" }
|
|
},
|
|
"created_at": { "type": "string" },
|
|
"updated_at": { "type": "string" }
|
|
},
|
|
"required": ["id", "name"],
|
|
"additionalProperties": false,
|
|
"example": {
|
|
"id": "bucket2",
|
|
"name": "bucket2",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
}
|
|
},
|
|
"example": [
|
|
{
|
|
"id": "avatars",
|
|
"type": "STANDARD",
|
|
"name": "avatars",
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bucket/{bucketId}/empty": {
|
|
"post": {
|
|
"summary": "Empty a bucket",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketId",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Empty bucket has been queued. Completion may take up to an hour."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bucket": {
|
|
"head": {
|
|
"summary": "Gets all buckets",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 1 },
|
|
"example": 10,
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 0,
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["id", "name", "created_at", "updated_at"] },
|
|
"in": "query",
|
|
"name": "sortColumn",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["asc", "desc"] },
|
|
"in": "query",
|
|
"name": "sortOrder",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "my-bucket",
|
|
"in": "query",
|
|
"name": "search",
|
|
"required": false
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"public": { "type": "boolean" },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": { "type": ["null", "integer"] },
|
|
"allowed_mime_types": {
|
|
"type": ["null", "array"],
|
|
"items": { "type": "string" }
|
|
},
|
|
"created_at": { "type": "string" },
|
|
"updated_at": { "type": "string" }
|
|
},
|
|
"required": ["id", "name"],
|
|
"additionalProperties": false,
|
|
"example": {
|
|
"id": "bucket2",
|
|
"name": "bucket2",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
}
|
|
},
|
|
"example": [
|
|
{
|
|
"id": "avatars",
|
|
"type": "STANDARD",
|
|
"name": "avatars",
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bucket/{bucketId}": {
|
|
"get": {
|
|
"summary": "Get details of a bucket",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketId",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"public": { "type": "boolean" },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": { "type": ["null", "integer"] },
|
|
"allowed_mime_types": {
|
|
"type": ["null", "array"],
|
|
"items": { "type": "string" }
|
|
},
|
|
"created_at": { "type": "string" },
|
|
"updated_at": { "type": "string" }
|
|
},
|
|
"required": ["id", "name"],
|
|
"additionalProperties": false
|
|
},
|
|
"example": {
|
|
"id": "bucket2",
|
|
"name": "bucket2",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Get details of a bucket",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketId",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"public": { "type": "boolean" },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": { "type": ["null", "integer"] },
|
|
"allowed_mime_types": {
|
|
"type": ["null", "array"],
|
|
"items": { "type": "string" }
|
|
},
|
|
"created_at": { "type": "string" },
|
|
"updated_at": { "type": "string" }
|
|
},
|
|
"required": ["id", "name"],
|
|
"additionalProperties": false
|
|
},
|
|
"example": {
|
|
"id": "bucket2",
|
|
"name": "bucket2",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"summary": "Update properties of a bucket",
|
|
"tags": ["bucket"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"minProperties": 1,
|
|
"properties": {
|
|
"public": { "type": "boolean", "example": false },
|
|
"file_size_limit": {
|
|
"anyOf": [
|
|
{ "type": "integer", "examples": [1000], "nullable": true, "minimum": 0 },
|
|
{ "type": "string", "examples": ["100MB"], "nullable": true }
|
|
]
|
|
},
|
|
"allowed_mime_types": {
|
|
"type": "array",
|
|
"nullable": true,
|
|
"items": { "type": "string", "example": ["image/png", "image/jpg"] }
|
|
}
|
|
},
|
|
"anyOf": [
|
|
{ "required": ["public"] },
|
|
{ "required": ["file_size_limit"] },
|
|
{ "required": ["allowed_mime_types"] }
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "bucketId", "required": true }
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"message": { "type": "string", "example": "Successfully updated" }
|
|
},
|
|
"required": ["message"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Delete a bucket",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketId",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"message": { "type": "string", "example": "Successfully deleted" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/{bucketName}/{*}": {
|
|
"delete": {
|
|
"summary": "Delete an object",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"message": { "type": "string", "example": "Successfully deleted" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"summary": "Get object",
|
|
"tags": ["object"],
|
|
"description": "Serve objects",
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"summary": "Update the object at an existing key",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"Id": { "type": "string" },
|
|
"Key": { "type": "string", "example": "avatars/folder/cat.png" }
|
|
},
|
|
"required": ["Key"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Retrieve object info",
|
|
"tags": ["object"],
|
|
"description": "Head object info",
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Upload a new object",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"Id": { "type": "string" },
|
|
"Key": { "type": "string", "example": "avatars/folder/cat.png" }
|
|
},
|
|
"required": ["Key"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/{bucketName}": {
|
|
"delete": {
|
|
"summary": "Delete multiple objects",
|
|
"tags": ["object"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"prefixes": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"minItems": 1,
|
|
"example": ["folder/cat.png", "folder/morecats.png"]
|
|
}
|
|
},
|
|
"required": ["prefixes"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"bucket_id": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"version": { "type": "string" },
|
|
"id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"updated_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"created_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"last_accessed_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"metadata": {
|
|
"anyOf": [
|
|
{ "type": "object", "additionalProperties": true },
|
|
{ "type": "null" }
|
|
]
|
|
},
|
|
"user_metadata": {
|
|
"anyOf": [
|
|
{ "type": "object", "additionalProperties": true },
|
|
{ "type": "null" }
|
|
]
|
|
},
|
|
"buckets": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"public": { "type": "boolean" },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": { "type": ["null", "integer"] },
|
|
"allowed_mime_types": {
|
|
"type": ["null", "array"],
|
|
"items": { "type": "string" }
|
|
},
|
|
"created_at": { "type": "string" },
|
|
"updated_at": { "type": "string" }
|
|
},
|
|
"required": ["id", "name"],
|
|
"additionalProperties": false,
|
|
"example": {
|
|
"id": "bucket2",
|
|
"name": "bucket2",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
}
|
|
},
|
|
"required": ["name"],
|
|
"additionalProperties": false,
|
|
"title": "objectSchema",
|
|
"example": {
|
|
"name": "folder/cat.png",
|
|
"bucket_id": "avatars",
|
|
"owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
|
|
"id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
|
|
"updated_at": "2021-04-06T16:30:35.394674+00:00",
|
|
"created_at": "2021-04-06T16:30:35.394674+00:00",
|
|
"last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
|
|
"metadata": { "size": 1234 }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/authenticated/{bucketName}/{*}": {
|
|
"get": {
|
|
"summary": "Retrieve an object",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"examples": {
|
|
"filename.jpg": { "value": "filename.jpg" },
|
|
"example2": { "value": null }
|
|
},
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Retrieve object info",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/upload/sign/{bucketName}/{*}": {
|
|
"post": {
|
|
"summary": "Generate a presigned url to upload an object",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"example": "/object/sign/upload/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
|
|
},
|
|
"token": { "type": "string" }
|
|
},
|
|
"required": ["url"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"summary": "Uploads an object via a presigned URL",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk",
|
|
"in": "query",
|
|
"name": "token",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"Key": { "type": "string", "example": "avatars/folder/cat.png" }
|
|
},
|
|
"required": ["Key"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/sign/{bucketName}/{*}": {
|
|
"post": {
|
|
"summary": "Generate a presigned url to retrieve an object",
|
|
"tags": ["object"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"expiresIn": { "type": "integer", "minimum": 1, "example": 60000 },
|
|
"transform": {
|
|
"type": "object",
|
|
"properties": {
|
|
"height": { "type": "integer", "minimum": 0, "example": 100 },
|
|
"width": { "type": "integer", "minimum": 0, "example": 100 },
|
|
"resize": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"format": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"quality": { "type": "integer", "minimum": 20, "maximum": 100 }
|
|
}
|
|
}
|
|
},
|
|
"required": ["expiresIn"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"signedURL": {
|
|
"type": "string",
|
|
"example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
|
|
}
|
|
},
|
|
"required": ["signedURL"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"summary": "Retrieve an object via a presigned URL",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"examples": {
|
|
"filename.jpg": { "value": "filename.jpg" },
|
|
"example2": { "value": null }
|
|
},
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk",
|
|
"in": "query",
|
|
"name": "token",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Retrieve an object via a presigned URL",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"examples": {
|
|
"filename.jpg": { "value": "filename.jpg" },
|
|
"example2": { "value": null }
|
|
},
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk",
|
|
"in": "query",
|
|
"name": "token",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/sign/{bucketName}": {
|
|
"post": {
|
|
"summary": "Generate presigned urls to retrieve objects",
|
|
"tags": ["object"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"expiresIn": { "type": "integer", "minimum": 1, "example": 60000 },
|
|
"paths": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"minItems": 1,
|
|
"example": ["folder/cat.png", "folder/morecats.png"]
|
|
}
|
|
},
|
|
"required": ["expiresIn", "paths"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": ["null", "string"],
|
|
"example": "Either the object does not exist or you do not have access to it"
|
|
},
|
|
"path": { "type": "string", "example": "folder/cat.png" },
|
|
"signedURL": {
|
|
"type": ["null", "string"],
|
|
"example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
|
|
}
|
|
},
|
|
"required": ["error", "path", "signedURL"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/move": {
|
|
"post": {
|
|
"summary": "Moves an object",
|
|
"tags": ["object"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bucketId": { "type": "string", "example": "avatars" },
|
|
"sourceKey": { "type": "string", "example": "folder/cat.png" },
|
|
"destinationBucket": { "type": "string", "example": "users" },
|
|
"destinationKey": { "type": "string", "example": "folder/newcat.png" }
|
|
},
|
|
"required": ["bucketId", "sourceKey", "destinationKey"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"message": { "type": "string", "example": "Successfully moved" }
|
|
},
|
|
"required": ["message"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/list-v2/{bucketName}": {
|
|
"post": {
|
|
"summary": "Search for objects under a prefix",
|
|
"tags": ["object"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"prefix": { "type": "string", "example": "folder/subfolder" },
|
|
"limit": { "type": "integer", "minimum": 1, "example": 10 },
|
|
"cursor": { "type": "string" },
|
|
"with_delimiter": { "type": "boolean" },
|
|
"sortBy": {
|
|
"type": "object",
|
|
"properties": {
|
|
"column": { "type": "string", "enum": ["name", "updated_at", "created_at"] },
|
|
"order": { "type": "string", "enum": ["asc", "desc"] }
|
|
},
|
|
"required": ["column"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "bucketName", "required": true }
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/object/list/{bucketName}": {
|
|
"post": {
|
|
"summary": "Search for objects under a prefix",
|
|
"tags": ["object"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"prefix": { "type": "string", "example": "folder/subfolder" },
|
|
"limit": { "type": "integer", "minimum": 1, "example": 10 },
|
|
"offset": { "type": "integer", "minimum": 0, "example": 0 },
|
|
"sortBy": {
|
|
"type": "object",
|
|
"properties": {
|
|
"column": {
|
|
"type": "string",
|
|
"enum": ["name", "updated_at", "created_at", "last_accessed_at"]
|
|
},
|
|
"order": { "type": "string", "enum": ["asc", "desc"] }
|
|
},
|
|
"required": ["column"]
|
|
},
|
|
"search": { "type": "string" }
|
|
},
|
|
"required": ["prefix"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "bucketName", "required": true }
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"bucket_id": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"version": { "type": "string" },
|
|
"id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"updated_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"created_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"last_accessed_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"metadata": {
|
|
"anyOf": [
|
|
{ "type": "object", "additionalProperties": true },
|
|
{ "type": "null" }
|
|
]
|
|
},
|
|
"user_metadata": {
|
|
"anyOf": [
|
|
{ "type": "object", "additionalProperties": true },
|
|
{ "type": "null" }
|
|
]
|
|
},
|
|
"buckets": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"public": { "type": "boolean" },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": { "type": ["null", "integer"] },
|
|
"allowed_mime_types": {
|
|
"type": ["null", "array"],
|
|
"items": { "type": "string" }
|
|
},
|
|
"created_at": { "type": "string" },
|
|
"updated_at": { "type": "string" }
|
|
},
|
|
"required": ["id", "name"],
|
|
"additionalProperties": false,
|
|
"example": {
|
|
"id": "bucket2",
|
|
"name": "bucket2",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
}
|
|
},
|
|
"required": ["name"],
|
|
"additionalProperties": false,
|
|
"example": {
|
|
"name": "folder/cat.png",
|
|
"bucket_id": "avatars",
|
|
"owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
|
|
"id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
|
|
"updated_at": "2021-04-06T16:30:35.394674+00:00",
|
|
"created_at": "2021-04-06T16:30:35.394674+00:00",
|
|
"last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
|
|
"metadata": { "size": 1234 }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/info/authenticated/{bucketName}/{*}": {
|
|
"get": {
|
|
"summary": "Retrieve object info",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Retrieve object info",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/info/{bucketName}/{*}": {
|
|
"get": {
|
|
"summary": "Retrieve object info",
|
|
"tags": ["object"],
|
|
"description": "Object Info",
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Retrieve object info",
|
|
"tags": ["object"],
|
|
"description": "Object Info",
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/copy": {
|
|
"post": {
|
|
"summary": "Copies an object",
|
|
"tags": ["object"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bucketId": { "type": "string", "example": "avatars" },
|
|
"sourceKey": { "type": "string", "example": "folder/source.png" },
|
|
"destinationBucket": { "type": "string", "example": "users" },
|
|
"destinationKey": { "type": "string", "example": "folder/destination.png" },
|
|
"metadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cacheControl": { "type": "string" },
|
|
"mimetype": { "type": "string" }
|
|
}
|
|
},
|
|
"copyMetadata": { "type": "boolean", "example": true }
|
|
},
|
|
"required": ["sourceKey", "bucketId", "destinationKey"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": {
|
|
"Id": { "type": "string" },
|
|
"Key": { "type": "string", "example": "folder/destination.png" },
|
|
"name": { "type": "string" },
|
|
"bucket_id": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"version": { "type": "string" },
|
|
"id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"updated_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"created_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"last_accessed_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
|
|
"metadata": {
|
|
"anyOf": [
|
|
{ "type": "object", "additionalProperties": true },
|
|
{ "type": "null" }
|
|
]
|
|
},
|
|
"user_metadata": {
|
|
"anyOf": [
|
|
{ "type": "object", "additionalProperties": true },
|
|
{ "type": "null" }
|
|
]
|
|
},
|
|
"buckets": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"owner": { "type": "string" },
|
|
"owner_id": { "type": "string" },
|
|
"public": { "type": "boolean" },
|
|
"type": { "type": "string", "enum": ["STANDARD", "ANALYTICS"] },
|
|
"file_size_limit": { "type": ["null", "integer"] },
|
|
"allowed_mime_types": {
|
|
"type": ["null", "array"],
|
|
"items": { "type": "string" }
|
|
},
|
|
"created_at": { "type": "string" },
|
|
"updated_at": { "type": "string" }
|
|
},
|
|
"required": ["id", "name"],
|
|
"additionalProperties": false,
|
|
"example": {
|
|
"id": "bucket2",
|
|
"name": "bucket2",
|
|
"public": false,
|
|
"file_size_limit": 1000000,
|
|
"allowed_mime_types": ["image/png", "image/jpeg"],
|
|
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
|
|
"created_at": "2021-02-17T04:43:32.770206+00:00",
|
|
"updated_at": "2021-02-17T04:43:32.770206+00:00"
|
|
}
|
|
}
|
|
},
|
|
"required": ["Key"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/public/{bucketName}/{*}": {
|
|
"get": {
|
|
"summary": "Retrieve an object from a public bucket",
|
|
"tags": ["object"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"examples": {
|
|
"filename.jpg": { "value": "filename.jpg" },
|
|
"example2": { "value": null }
|
|
},
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Get object info",
|
|
"tags": ["object"],
|
|
"description": "returns object info",
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/object/info/public/{bucketName}/{*}": {
|
|
"get": {
|
|
"summary": "Get object info",
|
|
"tags": ["object"],
|
|
"description": "returns object info",
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/render/image/authenticated/{bucketName}/{*}": {
|
|
"get": {
|
|
"summary": "Render an authenticated image with the given transformations",
|
|
"tags": ["transformation"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "filename.png",
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Render an authenticated image with the given transformations",
|
|
"tags": ["transformation"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "filename.png",
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/render/image/sign/{bucketName}/{*}": {
|
|
"get": {
|
|
"summary": "Render an authenticated image with the given transformations",
|
|
"tags": ["transformation"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk",
|
|
"in": "query",
|
|
"name": "token",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "filename.png",
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Render an authenticated image with the given transformations",
|
|
"tags": ["transformation"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk",
|
|
"in": "query",
|
|
"name": "token",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "filename.png",
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/render/image/public/{bucketName}/{*}": {
|
|
"get": {
|
|
"summary": "Render a public image with the given transformations",
|
|
"tags": ["transformation"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "filename.png",
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Render a public image with the given transformations",
|
|
"tags": ["transformation"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "height",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 100,
|
|
"in": "query",
|
|
"name": "width",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["cover", "contain", "fill"] },
|
|
"in": "query",
|
|
"name": "resize",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["origin", "avif", "webp"] },
|
|
"in": "query",
|
|
"name": "format",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 20, "maximum": 100 },
|
|
"in": "query",
|
|
"name": "quality",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "filename.png",
|
|
"in": "query",
|
|
"name": "download",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/s3/{Bucket}/{*}": {
|
|
"put": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true },
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true },
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"post": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true },
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"delete": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true },
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"get": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true },
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "*", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/s3/{Bucket}": {
|
|
"delete": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"put": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"post": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"get": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/s3/{Bucket}/": {
|
|
"delete": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"put": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"post": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"get": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"tags": ["s3"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "path", "name": "Bucket", "required": true }
|
|
],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/s3/": {
|
|
"get": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } }
|
|
},
|
|
"/cdn/{bucketName}/{*}": {
|
|
"delete": {
|
|
"summary": "Purge cache for an object",
|
|
"tags": ["cdn"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "folder/cat.png",
|
|
"in": "path",
|
|
"name": "*",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Successful response",
|
|
"type": "object",
|
|
"properties": { "message": { "type": "string", "example": "success" } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"description": "Error response",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/health/": {
|
|
"get": {
|
|
"summary": "healthcheck",
|
|
"tags": ["health"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"summary": "healthcheck",
|
|
"tags": ["health"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/health": {
|
|
"head": {
|
|
"summary": "healthcheck",
|
|
"tags": ["health"],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/iceberg/bucket": {
|
|
"post": {
|
|
"summary": "Create an analytics bucket",
|
|
"tags": ["bucket"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "name": { "type": "string", "example": "avatars" } },
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"get": {
|
|
"summary": "List analytics buckets",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 1 },
|
|
"example": 10,
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 0,
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["id", "name", "created_at", "updated_at"] },
|
|
"in": "query",
|
|
"name": "sortColumn",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["asc", "desc"] },
|
|
"in": "query",
|
|
"name": "sortOrder",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "my-bucket",
|
|
"in": "query",
|
|
"name": "search",
|
|
"required": false
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"summary": "List analytics buckets",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "integer", "minimum": 1 },
|
|
"example": 10,
|
|
"in": "query",
|
|
"name": "limit",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "integer", "minimum": 0 },
|
|
"example": 0,
|
|
"in": "query",
|
|
"name": "offset",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["id", "name", "created_at", "updated_at"] },
|
|
"in": "query",
|
|
"name": "sortColumn",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string", "enum": ["asc", "desc"] },
|
|
"in": "query",
|
|
"name": "sortOrder",
|
|
"required": false
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "my-bucket",
|
|
"in": "query",
|
|
"name": "search",
|
|
"required": false
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/iceberg/bucket/{bucketName}": {
|
|
"delete": {
|
|
"summary": "Delete an analytics bucket",
|
|
"tags": ["bucket"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "avatars",
|
|
"in": "path",
|
|
"name": "bucketName",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/iceberg/v1/config": {
|
|
"get": {
|
|
"summary": "Get Iceberg catalog configuration",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "my-warehouse",
|
|
"in": "query",
|
|
"name": "warehouse",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"summary": "Get Iceberg catalog configuration",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "my-warehouse",
|
|
"in": "query",
|
|
"name": "warehouse",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/iceberg/v1/{prefix}/namespaces": {
|
|
"post": {
|
|
"summary": "Create a namespace",
|
|
"tags": ["iceberg"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"namespace": { "type": "string", "example": "namespace" },
|
|
"properties": { "type": "object", "additionalProperties": { "type": "string" } }
|
|
},
|
|
"required": ["namespace"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"get": {
|
|
"summary": "List namespaces",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "query", "name": "pageToken", "required": false },
|
|
{ "schema": { "type": "number" }, "in": "query", "name": "pageSize", "required": false },
|
|
{ "schema": { "type": "string" }, "in": "query", "name": "parent", "required": false },
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"head": {
|
|
"summary": "List namespaces",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "query", "name": "pageToken", "required": false },
|
|
{ "schema": { "type": "number" }, "in": "query", "name": "pageSize", "required": false },
|
|
{ "schema": { "type": "string" }, "in": "query", "name": "parent", "required": false },
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/iceberg/v1/{prefix}/namespaces/{namespace}": {
|
|
"head": {
|
|
"summary": "Load a namespace",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"get": {
|
|
"summary": "Load a namespace",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"delete": {
|
|
"summary": "Drop a namespace",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/iceberg/v1/{prefix}/namespaces/{namespace}/tables": {
|
|
"post": {
|
|
"summary": "Create a table in the given namespace",
|
|
"tags": ["iceberg"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["name", "schema"],
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"location": { "type": "string", "format": "uri", "nullable": true },
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"type": "object",
|
|
"required": ["type", "fields"],
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["struct"] },
|
|
"fields": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["id", "name", "type", "required"],
|
|
"properties": {
|
|
"id": { "type": "integer" },
|
|
"name": { "type": "string" },
|
|
"type": {
|
|
"oneOf": [
|
|
{ "type": "string" },
|
|
{
|
|
"type": "object",
|
|
"required": ["type", "fields"],
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["struct"] },
|
|
"fields": {
|
|
"type": "array",
|
|
"items": {
|
|
"$comment": "recurse nested StructField definitions here"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"element-id",
|
|
"element",
|
|
"element-required"
|
|
],
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["list"] },
|
|
"element-id": { "type": "integer" },
|
|
"element": { "$comment": "Type object (recurse)" },
|
|
"element-required": { "type": "boolean" }
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"key-id",
|
|
"key",
|
|
"value-id",
|
|
"value",
|
|
"value-required"
|
|
],
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["map"] },
|
|
"key-id": { "type": "integer" },
|
|
"key": { "$comment": "Type object (recurse)" },
|
|
"value-id": { "type": "integer" },
|
|
"value": { "$comment": "Type object (recurse)" },
|
|
"value-required": { "type": "boolean" }
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"required": { "type": "boolean" },
|
|
"doc": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"schema-id": { "type": "integer", "readOnly": true },
|
|
"identifier-field-ids": {
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"spec": {
|
|
"type": "object",
|
|
"required": ["fields"],
|
|
"properties": {
|
|
"spec-id": { "type": "integer", "readOnly": true },
|
|
"fields": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["source-id", "transform", "name"],
|
|
"properties": {
|
|
"field-id": { "type": "integer" },
|
|
"source-id": { "type": "integer" },
|
|
"name": { "type": "string" },
|
|
"transform": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"properties": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
"stage-create": { "type": "boolean", "default": false },
|
|
"write-order": {
|
|
"type": "object",
|
|
"nullable": true,
|
|
"required": ["fields"],
|
|
"properties": {
|
|
"order-id": { "type": "integer", "readOnly": true },
|
|
"fields": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["source-id", "transform", "direction", "null-order"],
|
|
"properties": {
|
|
"source-id": { "type": "integer" },
|
|
"transform": { "type": "string" },
|
|
"direction": { "type": "string", "enum": ["asc", "desc"] },
|
|
"null-order": {
|
|
"type": "string",
|
|
"enum": ["nulls-first", "nulls-last"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "type": "object", "additionalProperties": true } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"summary": "Create a table",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "query", "name": "pageToken", "required": false },
|
|
{ "schema": { "type": "number" }, "in": "query", "name": "pageSize", "required": false },
|
|
{ "schema": { "type": "string" }, "in": "query", "name": "parent", "required": false },
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "type": "object", "additionalProperties": true } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Create a table",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{ "schema": { "type": "string" }, "in": "query", "name": "pageToken", "required": false },
|
|
{ "schema": { "type": "number" }, "in": "query", "name": "pageSize", "required": false },
|
|
{ "schema": { "type": "string" }, "in": "query", "name": "parent", "required": false },
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "type": "object", "additionalProperties": true } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/iceberg/v1/{prefix}/namespaces/{namespace}/tables/{table}": {
|
|
"get": {
|
|
"summary": "Load an Iceberg Table",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "table",
|
|
"in": "path",
|
|
"name": "table",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "type": "object", "additionalProperties": true } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"summary": "Load an Iceberg Table",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "table",
|
|
"in": "path",
|
|
"name": "table",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "type": "object", "additionalProperties": true } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Drop a Table",
|
|
"tags": ["iceberg"],
|
|
"parameters": [
|
|
{
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["true", "false", "True", "False"],
|
|
"default": "false"
|
|
},
|
|
"in": "query",
|
|
"name": "purgeRequested",
|
|
"required": false,
|
|
"description": "If true, the table will be permanently deleted"
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "table",
|
|
"in": "path",
|
|
"name": "table",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
},
|
|
"post": {
|
|
"summary": "Commit updates to multiple tables in an atomic operation",
|
|
"tags": ["iceberg"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"description": "Commit updates to multiple tables in an atomic operation",
|
|
"properties": {
|
|
"requirements": {
|
|
"type": "array",
|
|
"description": "Assertions to validate before applying updates",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A requirement assertion",
|
|
"required": ["type"],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Type of the requirement (e.g. assert-ref-snapshot-id, assert-table-uuid)",
|
|
"example": "assert-ref-snapshot-id"
|
|
},
|
|
"ref": { "type": "string" },
|
|
"uuid": { "type": "string" },
|
|
"args": { "type": "object", "additionalProperties": true }
|
|
},
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"updates": {
|
|
"type": "array",
|
|
"description": "Metadata updates to apply to the table",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A single update operation",
|
|
"required": ["action"],
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"description": "Action to perform (e.g. add-snapshot, set-snapshot-ref)",
|
|
"example": "add-snapshot"
|
|
},
|
|
"snapshot": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sequence-number": { "type": "integer" },
|
|
"timestamp-ms": { "type": "integer" },
|
|
"manifest-list": { "type": "string" },
|
|
"summary": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"operation": { "type": "string" },
|
|
"added-files-size": { "type": "string" },
|
|
"added-data-files": { "type": "string" },
|
|
"added-records": { "type": "string" },
|
|
"total-delete-files": { "type": "string" },
|
|
"total-records": { "type": "string" },
|
|
"total-position-deletes": { "type": "string" },
|
|
"total-equality-deletes": { "type": "string" }
|
|
}
|
|
},
|
|
"schema-id": { "type": "integer" }
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"ref-name": { "type": "string" },
|
|
"type": { "type": "string" },
|
|
"args": { "type": "object", "additionalProperties": true }
|
|
},
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
},
|
|
"required": ["updates", "requirements"]
|
|
}
|
|
}
|
|
},
|
|
"description": "Commit updates to multiple tables in an atomic operation"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "prefix",
|
|
"in": "path",
|
|
"name": "prefix",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "namespace",
|
|
"in": "path",
|
|
"name": "namespace",
|
|
"required": true
|
|
},
|
|
{
|
|
"schema": { "type": "string" },
|
|
"example": "table",
|
|
"in": "path",
|
|
"name": "table",
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Default Response",
|
|
"content": {
|
|
"application/json": { "schema": { "type": "object", "additionalProperties": true } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/vector/CreateIndex": {
|
|
"post": {
|
|
"summary": "Create a vector index",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"dataType": { "type": "string", "enum": ["float32"] },
|
|
"dimension": { "type": "number", "minimum": 1, "maximum": 4096 },
|
|
"distanceMetric": { "type": "string", "enum": ["cosine", "euclidean"] },
|
|
"indexName": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 45,
|
|
"pattern": "^[a-z0-9](?:[a-z0-9.-]{1,61})?[a-z0-9]$",
|
|
"description": "3-63 chars, lowercase letters, numbers, hyphens, dots; must start/end with letter or number. Must be unique within the vector bucket."
|
|
},
|
|
"metadataConfiguration": {
|
|
"type": "object",
|
|
"required": ["nonFilterableMetadataKeys"],
|
|
"properties": {
|
|
"nonFilterableMetadataKeys": {
|
|
"type": "array",
|
|
"items": { "type": "string" }
|
|
}
|
|
}
|
|
},
|
|
"vectorBucketName": { "type": "string" }
|
|
},
|
|
"required": [
|
|
"dataType",
|
|
"dimension",
|
|
"distanceMetric",
|
|
"indexName",
|
|
"vectorBucketName"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/DeleteIndex": {
|
|
"post": {
|
|
"summary": "Delete a vector index",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"indexName": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 45,
|
|
"pattern": "^[a-z0-9](?:[a-z0-9.-]{1,61})?[a-z0-9]$",
|
|
"description": "3-63 chars, lowercase letters, numbers, hyphens, dots; must start/end with letter or number. Must be unique within the vector bucket."
|
|
},
|
|
"vectorBucketName": { "type": "string" }
|
|
},
|
|
"required": ["indexName", "vectorBucketName"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/ListIndexes": {
|
|
"post": {
|
|
"summary": "List indexes in a vector bucket",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"vectorBucketName": { "type": "string" },
|
|
"maxResults": { "type": "number", "minimum": 1, "maximum": 500, "default": 500 },
|
|
"nextToken": { "type": "string" },
|
|
"prefix": { "type": "string" }
|
|
},
|
|
"required": ["vectorBucketName"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/GetIndex": {
|
|
"post": {
|
|
"summary": "Get a vector index",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"vectorBucketName": { "type": "string" },
|
|
"indexName": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 45,
|
|
"pattern": "^[a-z0-9](?:[a-z0-9.-]{1,61})?[a-z0-9]$",
|
|
"description": "3-63 chars, lowercase letters, numbers, hyphens, dots; must start/end with letter or number. Must be unique within the vector bucket."
|
|
}
|
|
},
|
|
"required": ["vectorBucketName", "indexName"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/CreateVectorBucket": {
|
|
"post": {
|
|
"summary": "Create a vector bucket",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "vectorBucketName": { "type": "string" } },
|
|
"required": ["vectorBucketName"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/DeleteVectorBucket": {
|
|
"post": {
|
|
"summary": "Create a vector bucket",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "vectorBucketName": { "type": "string" } },
|
|
"required": ["vectorBucketName"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/ListVectorBuckets": {
|
|
"post": {
|
|
"summary": "List vector buckets",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"maxResults": { "type": "number", "minimum": 1, "maximum": 500, "default": 500 },
|
|
"nextToken": { "type": "string" },
|
|
"prefix": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/GetVectorBucket": {
|
|
"post": {
|
|
"summary": "Create a vector bucket",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "vectorBucketName": { "type": "string" } },
|
|
"required": ["vectorBucketName"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/PutVectors": {
|
|
"post": {
|
|
"summary": "Put vectors into an index",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"vectorBucketName": { "type": "string" },
|
|
"indexName": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 45,
|
|
"pattern": "^[a-z0-9](?:[a-z0-9.-]{1,61})?[a-z0-9]$",
|
|
"description": "3-63 chars, lowercase letters, numbers, hyphens, dots; must start/end with letter or number. Must be unique within the vector bucket."
|
|
},
|
|
"vectors": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 500,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"float32": { "type": "array", "items": { "type": "number" } }
|
|
},
|
|
"required": ["float32"]
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{ "type": "string" },
|
|
{ "type": "boolean" },
|
|
{ "type": "number" }
|
|
]
|
|
}
|
|
},
|
|
"key": { "type": "string" }
|
|
},
|
|
"required": ["data"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["vectorBucketName", "indexName", "vectors"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/QueryVectors": {
|
|
"post": {
|
|
"summary": "Query vectors",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/def-2" } } }
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/DeleteVectors": {
|
|
"post": {
|
|
"summary": "Delete vectors from an index",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"vectorBucketName": { "type": "string" },
|
|
"indexName": { "type": "string" },
|
|
"keys": { "type": "array", "items": { "type": "string" } }
|
|
},
|
|
"required": ["vectorBucketName", "indexName", "keys"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/ListVectors": {
|
|
"post": {
|
|
"summary": "List vectors in a vector index",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"vectorBucketName": { "type": "string" },
|
|
"indexArn": { "type": "string" },
|
|
"indexName": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 45,
|
|
"pattern": "^[a-z0-9](?:[a-z0-9.-]{1,61})?[a-z0-9]$",
|
|
"description": "3-63 chars, lowercase letters, numbers, hyphens, dots; must start/end with letter or number. Must be unique within the vector bucket."
|
|
},
|
|
"maxResults": { "type": "number", "minimum": 1, "maximum": 500 },
|
|
"nextToken": { "type": "string" },
|
|
"returnData": { "type": "boolean" },
|
|
"returnMetadata": { "type": "boolean" },
|
|
"segmentCount": { "type": "number", "minimum": 1, "maximum": 16 },
|
|
"segmentIndex": { "type": "number", "minimum": 0, "maximum": 15 }
|
|
},
|
|
"required": ["vectorBucketName", "indexName"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
},
|
|
"/vector/GetVectors": {
|
|
"post": {
|
|
"summary": "Returns vector attributes",
|
|
"tags": ["vector"],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"indexName": { "type": "string" },
|
|
"keys": { "type": "array", "items": { "type": "string" } },
|
|
"returnData": { "type": "boolean", "default": false },
|
|
"returnMetadata": { "type": "boolean", "default": false },
|
|
"vectorBucketName": { "type": "string" }
|
|
},
|
|
"required": ["indexName", "keys", "vectorBucketName"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearerAuth": [] }],
|
|
"responses": { "200": { "description": "Default Response" } }
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{ "name": "object", "description": "Object end-points" },
|
|
{ "name": "bucket", "description": "Bucket end-points" },
|
|
{ "name": "s3", "description": "S3 end-points" },
|
|
{ "name": "transformation", "description": "Image transformation" },
|
|
{ "name": "resumable", "description": "Resumable Upload end-points" },
|
|
{ "name": "cdn", "description": "CDN cache management" },
|
|
{ "name": "health", "description": "Health check end-points" },
|
|
{ "name": "iceberg", "description": "Apache Iceberg REST catalog" },
|
|
{ "name": "vector", "description": "Vector storage and search" }
|
|
]
|
|
}
|