Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat: update mgmt api docs (#33642)

github-actions[bot]bf04ff668106
diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json
index c3ef4092d80..ce2edf917b5 100644
--- a/apps/docs/spec/api_v1_openapi.json
+++ b/apps/docs/spec/api_v1_openapi.json
@@ -2262,7 +2262,8 @@
"post": {
"operationId": "v1-create-a-function",
"summary": "Create a function",
- "description": "Creates a function and adds it to the specified project.",
+ "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.",
+ "deprecated": true,
"parameters": [
{
"name": "ref",
@@ -2301,12 +2302,6 @@
"required": false,
"in": "query",
"schema": { "type": "string" }
- },
- {
- "name": "compute_multiplier",
- "required": false,
- "in": "query",
- "schema": { "minimum": 1, "maximum": 4, "type": "number" }
}
],
"requestBody": {
@@ -2332,6 +2327,45 @@
},
"tags": ["Edge Functions"],
"security": [{ "bearer": [] }]
+ },
+ "put": {
+ "operationId": "v1-bulk-update-functions",
+ "summary": "Bulk update functions",
+ "description": "Bulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": { "minLength": 20, "maxLength": 20, "type": "string" }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/BulkUpdateFunctionBody" }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/BulkUpdateFunctionResponse" }
+ }
+ }
+ },
+ "403": { "description": "" },
+ "500": { "description": "Failed to update functions" }
+ },
+ "tags": ["Edge Functions"],
+ "security": [{ "bearer": [] }]
}
},
"/v1/projects/{ref}/functions/deploy": {
@@ -2352,6 +2386,12 @@
"required": false,
"in": "query",
"schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" }
+ },
+ {
+ "name": "bundleOnly",
+ "required": false,
+ "in": "query",
+ "schema": { "type": "boolean" }
}
],
"requestBody": {
@@ -2366,7 +2406,9 @@
"201": {
"description": "",
"content": {
- "application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } }
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/DeployFunctionResponse" }
+ }
}
},
"403": { "description": "" },
@@ -2461,12 +2503,6 @@
"required": false,
"in": "query",
"schema": { "type": "string" }
- },
- {
- "name": "compute_multiplier",
- "required": false,
- "in": "query",
- "schema": { "minimum": 1, "maximum": 4, "type": "number" }
}
],
"requestBody": {
@@ -4594,8 +4630,7 @@
"verify_jwt": { "type": "boolean" },
"import_map": { "type": "boolean" },
"entrypoint_path": { "type": "string" },
- "import_map_path": { "type": "string" },
- "compute_multiplier": { "type": "number" }
+ "import_map_path": { "type": "string" }
},
"required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"]
},
@@ -4605,35 +4640,72 @@
"slug": { "type": "string", "pattern": "/^[A-Za-z0-9_-]+$/" },
"name": { "type": "string" },
"body": { "type": "string" },
- "verify_jwt": { "type": "boolean" },
- "compute_multiplier": { "type": "number", "minimum": 1, "maximum": 4 }
+ "verify_jwt": { "type": "boolean" }
},
"required": ["slug", "name", "body"]
},
- "FunctionDeployBody": {
+ "BulkUpdateFunctionBody": {
"type": "object",
"properties": {
- "file": {
+ "version": { "type": "integer" },
+ "created_at": { "type": "integer", "format": "int64" },
+ "id": { "type": "string" },
+ "slug": { "type": "string" },
+ "name": { "type": "string" },
+ "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" },
+ "verify_jwt": { "type": "boolean" },
+ "import_map": { "type": "boolean" },
+ "entrypoint_path": { "type": "string" },
+ "import_map_path": { "type": "string" }
+ },
+ "required": ["version", "id", "slug", "name", "status"]
+ },
+ "BulkUpdateFunctionResponse": {
+ "type": "object",
+ "properties": {
+ "functions": {
"type": "array",
- "items": { "type": "file", "items": { "type": "string", "format": "binary" } }
- },
- "metadata": {
- "type": "object",
- "properties": {
- "entrypoint_path": { "required": true, "type": "string" },
- "import_map_path": { "required": false, "type": "string" },
- "static_patterns": {
- "required": false,
- "type": "array",
- "items": { "type": "string" }
- },
- "verify_jwt": { "required": false, "type": "boolean" },
- "name": { "required": false, "type": "string" }
- }
+ "items": { "$ref": "#/components/schemas/FunctionResponse" }
}
},
+ "required": ["functions"]
+ },
+ "FunctionDeployMetadata": {
+ "type": "object",
+ "properties": {
+ "entrypoint_path": { "type": "string" },
+ "import_map_path": { "type": "string" },
+ "static_patterns": { "type": "array", "items": { "type": "string" } },
+ "verify_jwt": { "type": "boolean" },
+ "name": { "type": "string" }
+ },
+ "required": ["entrypoint_path"]
+ },
+ "FunctionDeployBody": {
+ "type": "object",
+ "properties": {
+ "file": { "type": "array", "items": { "type": "string", "format": "binary" } },
+ "metadata": { "$ref": "#/components/schemas/FunctionDeployMetadata" }
+ },
"required": ["file", "metadata"]
},
+ "DeployFunctionResponse": {
+ "type": "object",
+ "properties": {
+ "version": { "type": "integer" },
+ "created_at": { "type": "integer", "format": "int64" },
+ "updated_at": { "type": "integer", "format": "int64" },
+ "id": { "type": "string" },
+ "slug": { "type": "string" },
+ "name": { "type": "string" },
+ "status": { "enum": ["ACTIVE", "REMOVED", "THROTTLED"], "type": "string" },
+ "verify_jwt": { "type": "boolean" },
+ "import_map": { "type": "boolean" },
+ "entrypoint_path": { "type": "string" },
+ "import_map_path": { "type": "string" }
+ },
+ "required": ["version", "id", "slug", "name", "status"]
+ },
"FunctionSlugResponse": {
"type": "object",
"properties": {
@@ -4647,8 +4719,7 @@
"verify_jwt": { "type": "boolean" },
"import_map": { "type": "boolean" },
"entrypoint_path": { "type": "string" },
- "import_map_path": { "type": "string" },
- "compute_multiplier": { "type": "number" }
+ "import_map_path": { "type": "string" }
},
"required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"]
},
@@ -4657,8 +4728,7 @@
"properties": {
"name": { "type": "string" },
"body": { "type": "string" },
- "verify_jwt": { "type": "boolean" },
- "compute_multiplier": { "type": "number", "minimum": 1, "maximum": 4 }
+ "verify_jwt": { "type": "boolean" }
}
},
"V1StorageBucketResponse": {
diff --git a/apps/docs/spec/common-api-sections.json b/apps/docs/spec/common-api-sections.json
index dd44a2e8b95..49207e11edf 100644
--- a/apps/docs/spec/common-api-sections.json
+++ b/apps/docs/spec/common-api-sections.json
@@ -225,6 +225,12 @@
"type": "category",
"title": "Edge Functions",
"items": [
+ {
+ "id": "v1-bulk-update-functions",
+ "title": "Bulk update functions",
+ "slug": "v1-bulk-update-functions",
+ "type": "operation"
+ },
{
"id": "v1-create-a-function",
"title": "Create a function",
diff --git a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
index ee6a05a7eb3..26c772546aa 100644
--- a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
+++ b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
@@ -8665,9 +8665,6 @@
},
"import_map_path": {
"type": "string"
- },
- "compute_multiplier": {
- "type": "number"
}
},
"required": [
@@ -8701,7 +8698,8 @@
"post": {
"operationId": "v1-create-a-function",
"summary": "Create a function",
- "description": "Creates a function and adds it to the specified project.",
+ "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.",
+ "deprecated": true,
"parameters": [
{
"name": "ref",
@@ -8762,16 +8760,6 @@
"schema": {
"type": "string"
}
- },
- {
- "name": "compute_multiplier",
- "required": false,
- "in": "query",
- "schema": {
- "minimum": 1,
- "maximum": 4,
- "type": "number"
- }
}
],
"requestBody": {
@@ -8793,11 +8781,6 @@
},
"verify_jwt": {
"type": "boolean"
- },
- "compute_multiplier": {
- "type": "number",
- "minimum": 1,
- "maximum": 4
}
},
"required": ["slug", "name", "body"]
@@ -8819,11 +8802,6 @@
},
"verify_jwt": {
"type": "boolean"
- },
- "compute_multiplier": {
- "type": "number",
- "minimum": 1,
- "maximum": 4
}
},
"required": ["slug", "name", "body"]
@@ -8874,9 +8852,6 @@
},
"import_map_path": {
"type": "string"
- },
- "compute_multiplier": {
- "type": "number"
}
},
"required": [
@@ -8905,6 +8880,152 @@
"bearer": []
}
]
+ },
+ "put": {
+ "operationId": "v1-bulk-update-functions",
+ "summary": "Bulk update functions",
+ "description": "Bulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer"
+ },
+ "created_at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "id": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "status": {
+ "enum": ["ACTIVE", "REMOVED", "THROTTLED"],
+ "type": "string"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ },
+ "import_map": {
+ "type": "boolean"
+ },
+ "entrypoint_path": {
+ "type": "string"
+ },
+ "import_map_path": {
+ "type": "string"
+ }
+ },
+ "required": ["version", "id", "slug", "name", "status"]
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "functions": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer"
+ },
+ "created_at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "updated_at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "id": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "status": {
+ "enum": ["ACTIVE", "REMOVED", "THROTTLED"],
+ "type": "string"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ },
+ "import_map": {
+ "type": "boolean"
+ },
+ "entrypoint_path": {
+ "type": "string"
+ },
+ "import_map_path": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "version",
+ "created_at",
+ "updated_at",
+ "id",
+ "slug",
+ "name",
+ "status"
+ ]
+ }
+ }
+ },
+ "required": ["functions"]
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update functions"
+ }
+ },
+ "tags": ["Edge Functions"],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
}
},
"/v1/projects/{ref}/functions/deploy": {
@@ -8932,6 +9053,14 @@
"pattern": "/^[A-Za-z0-9_-]+$/",
"type": "string"
}
+ },
+ {
+ "name": "bundleOnly",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "boolean"
+ }
}
],
"requestBody": {
@@ -8944,40 +9073,33 @@
"file": {
"type": "array",
"items": {
- "type": "file",
- "items": {
- "type": "string",
- "format": "binary"
- }
+ "type": "string",
+ "format": "binary"
}
},
"metadata": {
"type": "object",
"properties": {
"entrypoint_path": {
- "required": true,
"type": "string"
},
"import_map_path": {
- "required": false,
"type": "string"
},
"static_patterns": {
- "required": false,
"type": "array",
"items": {
"type": "string"
}
},
"verify_jwt": {
- "required": false,
"type": "boolean"
},
"name": {
- "required": false,
"type": "string"
}
- }
+ },
+ "required": ["entrypoint_path"]
}
},
"required": ["file", "metadata"]
@@ -9028,20 +9150,9 @@
},
"import_map_path": {
"type": "string"
- },
- "compute_multiplier": {
- "type": "number"
}
},
- "required": [
- "version",
- "created_at",
- "updated_at",
- "id",
- "slug",
- "name",
- "status"
- ]
+ "required": ["version", "id", "slug", "name", "status"]
}
}
}
@@ -9132,9 +9243,6 @@
},
"import_map_path": {
"type": "string"
- },
- "compute_multiplier": {
- "type": "number"
}
},
"required": [
@@ -9238,16 +9346,6 @@
"schema": {
"type": "string"
}
- },
- {
- "name": "compute_multiplier",
- "required": false,
- "in": "query",
- "schema": {
- "minimum": 1,
- "maximum": 4,
- "type": "number"
- }
}
],
"requestBody": {
@@ -9265,11 +9363,6 @@
},
"verify_jwt": {
"type": "boolean"
- },
- "compute_multiplier": {
- "type": "number",
- "minimum": 1,
- "maximum": 4
}
}
}
@@ -9286,11 +9379,6 @@
},
"verify_jwt": {
"type": "boolean"
- },
- "compute_multiplier": {
- "type": "number",
- "minimum": 1,
- "maximum": 4
}
}
}
@@ -9340,9 +9428,6 @@
},
"import_map_path": {
"type": "string"
- },
- "compute_multiplier": {
- "type": "number"
}
},
"required": [
@@ -14689,9 +14774,6 @@
},
"import_map_path": {
"type": "string"
- },
- "compute_multiplier": {
- "type": "number"
}
},
"required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"]
@@ -14711,60 +14793,161 @@
},
"verify_jwt": {
"type": "boolean"
- },
- "compute_multiplier": {
- "type": "number",
- "minimum": 1,
- "maximum": 4
}
},
"required": ["slug", "name", "body"]
},
+ "BulkUpdateFunctionBody": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer"
+ },
+ "created_at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "id": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "status": {
+ "enum": ["ACTIVE", "REMOVED", "THROTTLED"],
+ "type": "string"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ },
+ "import_map": {
+ "type": "boolean"
+ },
+ "entrypoint_path": {
+ "type": "string"
+ },
+ "import_map_path": {
+ "type": "string"
+ }
+ },
+ "required": ["version", "id", "slug", "name", "status"]
+ },
+ "BulkUpdateFunctionResponse": {
+ "type": "object",
+ "properties": {
+ "functions": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer"
+ },
+ "created_at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "updated_at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "id": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "status": {
+ "enum": ["ACTIVE", "REMOVED", "THROTTLED"],
+ "type": "string"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ },
+ "import_map": {
+ "type": "boolean"
+ },
+ "entrypoint_path": {
+ "type": "string"
+ },
+ "import_map_path": {
+ "type": "string"
+ }
+ },
+ "required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"]
+ }
+ }
+ },
+ "required": ["functions"]
+ },
+ "FunctionDeployMetadata": {
+ "type": "object",
+ "properties": {
+ "entrypoint_path": {
+ "type": "string"
+ },
+ "import_map_path": {
+ "type": "string"
+ },
+ "static_patterns": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": ["entrypoint_path"]
+ },
"FunctionDeployBody": {
"type": "object",
"properties": {
"file": {
"type": "array",
"items": {
- "type": "file",
- "items": {
- "type": "string",
- "format": "binary"
- }
+ "type": "string",
+ "format": "binary"
}
},
"metadata": {
"type": "object",
"properties": {
"entrypoint_path": {
- "required": true,
"type": "string"
},
"import_map_path": {
- "required": false,
"type": "string"
},
"static_patterns": {
- "required": false,
"type": "array",
"items": {
"type": "string"
}
},
"verify_jwt": {
- "required": false,
"type": "boolean"
},
"name": {
- "required": false,
"type": "string"
}
- }
+ },
+ "required": ["entrypoint_path"]
}
},
"required": ["file", "metadata"]
},
- "FunctionSlugResponse": {
+ "DeployFunctionResponse": {
"type": "object",
"properties": {
"version": {
@@ -14802,9 +14985,48 @@
},
"import_map_path": {
"type": "string"
+ }
+ },
+ "required": ["version", "id", "slug", "name", "status"]
+ },
+ "FunctionSlugResponse": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer"
},
- "compute_multiplier": {
- "type": "number"
+ "created_at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "updated_at": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "id": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "status": {
+ "enum": ["ACTIVE", "REMOVED", "THROTTLED"],
+ "type": "string"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ },
+ "import_map": {
+ "type": "boolean"
+ },
+ "entrypoint_path": {
+ "type": "string"
+ },
+ "import_map_path": {
+ "type": "string"
}
},
"required": ["version", "created_at", "updated_at", "id", "slug", "name", "status"]
@@ -14820,11 +15042,6 @@
},
"verify_jwt": {
"type": "boolean"
- },
- "compute_multiplier": {
- "type": "number",
- "minimum": 1,
- "maximum": 4
}
}
},