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 (#31092)

github-actions[bot]eb326ea75a64
diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json
index 1660b7e6d45..3802f4ea3f4 100644
--- a/apps/docs/spec/api_v1_openapi.json
+++ b/apps/docs/spec/api_v1_openapi.json
@@ -88,6 +88,35 @@
"security": [{ "bearer": [] }]
}
},
+ "/v1/branches/{branch_id}/push": {
+ "post": {
+ "operationId": "v1-push-a-branch",
+ "summary": "Pushes a database branch",
+ "description": "Pushes the specified database branch",
+ "parameters": [
+ {
+ "name": "branch_id",
+ "required": true,
+ "in": "path",
+ "description": "Branch ID",
+ "schema": { "type": "string" }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/BranchUpdateResponse" }
+ }
+ }
+ },
+ "500": { "description": "Failed to push database branch" }
+ },
+ "tags": ["Environments"],
+ "security": [{ "bearer": [] }]
+ }
+ },
"/v1/branches/{branch_id}/reset": {
"post": {
"operationId": "v1-reset-a-branch",
@@ -107,7 +136,7 @@
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/BranchResetResponse" }
+ "schema": { "$ref": "#/components/schemas/BranchUpdateResponse" }
}
}
},
@@ -284,6 +313,24 @@
"security": [{ "oauth2": ["write"] }]
}
},
+ "/v1/oauth/revoke": {
+ "post": {
+ "operationId": "v1-revoke-token",
+ "summary": "[Beta] Revoke oauth app authorization and it's corresponding tokens",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/OAuthRevokeTokenBodyDto" }
+ }
+ }
+ },
+ "responses": { "204": { "description": "" } },
+ "tags": ["OAuth"],
+ "security": [{ "oauth2": ["write"] }]
+ }
+ },
"/v1/snippets": {
"get": {
"operationId": "v1-list-all-snippets",
@@ -1977,6 +2024,24 @@
"security": [{ "bearer": [] }]
}
},
+ "/v1/projects/{ref}/pause": {
+ "post": {
+ "operationId": "v1-pause-a-project",
+ "summary": "Pauses the given project",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": { "minLength": 20, "maxLength": 20, "type": "string" }
+ }
+ ],
+ "responses": { "200": { "description": "" }, "403": { "description": "" } },
+ "tags": ["Projects"],
+ "security": [{ "bearer": [] }]
+ }
+ },
"/v1/projects/{ref}/database/query": {
"post": {
"operationId": "v1-run-a-query",
@@ -2670,9 +2735,13 @@
"UpdateBranchBody": {
"type": "object",
"properties": {
+ "reset_on_push": {
+ "type": "boolean",
+ "deprecated": true,
+ "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead."
+ },
"branch_name": { "type": "string" },
"git_branch": { "type": "string" },
- "reset_on_push": { "type": "boolean" },
"persistent": { "type": "boolean" },
"status": {
"enum": [
@@ -2691,14 +2760,17 @@
"type": "object",
"properties": {
"pr_number": { "type": "integer", "format": "int32" },
- "latest_check_run_id": { "type": "integer", "format": "int64" },
+ "latest_check_run_id": {
+ "type": "number",
+ "deprecated": true,
+ "description": "This field is deprecated and will not be populated."
+ },
"id": { "type": "string" },
"name": { "type": "string" },
"project_ref": { "type": "string" },
"parent_project_ref": { "type": "string" },
"is_default": { "type": "boolean" },
"git_branch": { "type": "string" },
- "reset_on_push": { "type": "boolean" },
"persistent": { "type": "boolean" },
"status": {
"enum": [
@@ -2720,7 +2792,6 @@
"project_ref",
"parent_project_ref",
"is_default",
- "reset_on_push",
"persistent",
"status",
"created_at",
@@ -2732,7 +2803,7 @@
"properties": { "message": { "type": "string" } },
"required": ["message"]
},
- "BranchResetResponse": {
+ "BranchUpdateResponse": {
"type": "object",
"properties": { "workflow_run_id": { "type": "string" }, "message": { "type": "string" } },
"required": ["workflow_run_id", "message"]
@@ -2791,10 +2862,7 @@
"type": "object",
"properties": {
"db_pass": { "type": "string", "description": "Database password" },
- "name": {
- "type": "string",
- "description": "Name of your project, should not contain dots"
- },
+ "name": { "type": "string", "description": "Name of your project" },
"organization_id": { "type": "string", "description": "Slug of your organization" },
"plan": {
"type": "string",
@@ -2939,6 +3007,16 @@
},
"required": ["expires_in", "token_type", "access_token", "refresh_token"]
},
+ "OAuthRevokeTokenBodyDto": {
+ "type": "object",
+ "properties": {
+ "client_id": { "type": "string", "format": "uuid" },
+ "client_secret": { "type": "string" },
+ "refresh_token": { "type": "string" }
+ },
+ "required": ["client_id", "client_secret", "refresh_token"],
+ "additionalProperties": false
+ },
"SnippetProject": {
"type": "object",
"properties": {
diff --git a/apps/docs/spec/common-api-sections.json b/apps/docs/spec/common-api-sections.json
index acbc5d0da6a..821e282f141 100644
--- a/apps/docs/spec/common-api-sections.json
+++ b/apps/docs/spec/common-api-sections.json
@@ -297,6 +297,12 @@
"slug": "v1-list-all-branches",
"type": "operation"
},
+ {
+ "id": "v1-push-a-branch",
+ "title": "Push a branch",
+ "slug": "v1-push-a-branch",
+ "type": "operation"
+ },
{
"id": "v1-reset-a-branch",
"title": "Reset a branch",
@@ -326,6 +332,12 @@
"title": "Exchange oauth token",
"slug": "v1-exchange-oauth-token",
"type": "operation"
+ },
+ {
+ "id": "v1-revoke-token",
+ "title": "Revoke token",
+ "slug": "v1-revoke-token",
+ "type": "operation"
}
]
},
@@ -423,6 +435,12 @@
"slug": "v1-list-all-projects",
"type": "operation"
},
+ {
+ "id": "v1-pause-a-project",
+ "title": "Pause a project",
+ "slug": "v1-pause-a-project",
+ "type": "operation"
+ },
{
"id": "v1-update-network-restrictions",
"title": "Update network restrictions",
diff --git a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
index 6c6e1572af7..f6305737fb3 100644
--- a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
+++ b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
@@ -172,15 +172,17 @@
"schema": {
"type": "object",
"properties": {
+ "reset_on_push": {
+ "type": "boolean",
+ "deprecated": true,
+ "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead."
+ },
"branch_name": {
"type": "string"
},
"git_branch": {
"type": "string"
},
- "reset_on_push": {
- "type": "boolean"
- },
"persistent": {
"type": "boolean"
},
@@ -213,8 +215,9 @@
"format": "int32"
},
"latest_check_run_id": {
- "type": "integer",
- "format": "int64"
+ "type": "number",
+ "deprecated": true,
+ "description": "This field is deprecated and will not be populated."
},
"id": {
"type": "string"
@@ -234,9 +237,6 @@
"git_branch": {
"type": "string"
},
- "reset_on_push": {
- "type": "boolean"
- },
"persistent": {
"type": "boolean"
},
@@ -264,7 +264,6 @@
"project_ref",
"parent_project_ref",
"is_default",
- "reset_on_push",
"persistent",
"status",
"created_at",
@@ -329,6 +328,54 @@
]
}
},
+ "/v1/branches/{branch_id}/push": {
+ "post": {
+ "operationId": "v1-push-a-branch",
+ "summary": "Pushes a database branch",
+ "description": "Pushes the specified database branch",
+ "parameters": [
+ {
+ "name": "branch_id",
+ "required": true,
+ "in": "path",
+ "description": "Branch ID",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "workflow_run_id": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["workflow_run_id", "message"]
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to push database branch"
+ }
+ },
+ "tags": ["Environments"],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
"/v1/branches/{branch_id}/reset": {
"post": {
"operationId": "v1-reset-a-branch",
@@ -497,7 +544,7 @@
},
"name": {
"type": "string",
- "description": "Name of your project, should not contain dots"
+ "description": "Name of your project"
},
"organization_id": {
"type": "string",
@@ -896,6 +943,48 @@
]
}
},
+ "/v1/oauth/revoke": {
+ "post": {
+ "operationId": "v1-revoke-token",
+ "summary": "[Beta] Revoke oauth app authorization and it's corresponding tokens",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "client_id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "client_secret": {
+ "type": "string"
+ },
+ "refresh_token": {
+ "type": "string"
+ }
+ },
+ "required": ["client_id", "client_secret", "refresh_token"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "responses": {
+ "204": {
+ "description": ""
+ }
+ },
+ "tags": ["OAuth"],
+ "security": [
+ {
+ "oauth2": ["write"]
+ }
+ ]
+ }
+ },
"/v1/snippets": {
"get": {
"operationId": "v1-list-all-snippets",
@@ -1753,8 +1842,9 @@
"format": "int32"
},
"latest_check_run_id": {
- "type": "integer",
- "format": "int64"
+ "type": "number",
+ "deprecated": true,
+ "description": "This field is deprecated and will not be populated."
},
"id": {
"type": "string"
@@ -1774,9 +1864,6 @@
"git_branch": {
"type": "string"
},
- "reset_on_push": {
- "type": "boolean"
- },
"persistent": {
"type": "boolean"
},
@@ -1804,7 +1891,6 @@
"project_ref",
"parent_project_ref",
"is_default",
- "reset_on_push",
"persistent",
"status",
"created_at",
@@ -1905,8 +1991,9 @@
"format": "int32"
},
"latest_check_run_id": {
- "type": "integer",
- "format": "int64"
+ "type": "number",
+ "deprecated": true,
+ "description": "This field is deprecated and will not be populated."
},
"id": {
"type": "string"
@@ -1926,9 +2013,6 @@
"git_branch": {
"type": "string"
},
- "reset_on_push": {
- "type": "boolean"
- },
"persistent": {
"type": "boolean"
},
@@ -1956,7 +2040,6 @@
"project_ref",
"parent_project_ref",
"is_default",
- "reset_on_push",
"persistent",
"status",
"created_at",
@@ -8021,6 +8104,39 @@
]
}
},
+ "/v1/projects/{ref}/pause": {
+ "post": {
+ "operationId": "v1-pause-a-project",
+ "summary": "Pauses the given project",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "403": {
+ "description": ""
+ }
+ },
+ "tags": ["Projects"],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
"/v1/projects/{ref}/database/query": {
"post": {
"operationId": "v1-run-a-query",
@@ -10072,15 +10188,17 @@
"UpdateBranchBody": {
"type": "object",
"properties": {
+ "reset_on_push": {
+ "type": "boolean",
+ "deprecated": true,
+ "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead."
+ },
"branch_name": {
"type": "string"
},
"git_branch": {
"type": "string"
},
- "reset_on_push": {
- "type": "boolean"
- },
"persistent": {
"type": "boolean"
},
@@ -10105,8 +10223,9 @@
"format": "int32"
},
"latest_check_run_id": {
- "type": "integer",
- "format": "int64"
+ "type": "number",
+ "deprecated": true,
+ "description": "This field is deprecated and will not be populated."
},
"id": {
"type": "string"
@@ -10126,9 +10245,6 @@
"git_branch": {
"type": "string"
},
- "reset_on_push": {
- "type": "boolean"
- },
"persistent": {
"type": "boolean"
},
@@ -10156,7 +10272,6 @@
"project_ref",
"parent_project_ref",
"is_default",
- "reset_on_push",
"persistent",
"status",
"created_at",
@@ -10172,7 +10287,7 @@
},
"required": ["message"]
},
- "BranchResetResponse": {
+ "BranchUpdateResponse": {
"type": "object",
"properties": {
"workflow_run_id": {
@@ -10285,7 +10400,7 @@
},
"name": {
"type": "string",
- "description": "Name of your project, should not contain dots"
+ "description": "Name of your project"
},
"organization_id": {
"type": "string",
@@ -10479,6 +10594,23 @@
},
"required": ["expires_in", "token_type", "access_token", "refresh_token"]
},
+ "OAuthRevokeTokenBodyDto": {
+ "type": "object",
+ "properties": {
+ "client_id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "client_secret": {
+ "type": "string"
+ },
+ "refresh_token": {
+ "type": "string"
+ }
+ },
+ "required": ["client_id", "client_secret", "refresh_token"],
+ "additionalProperties": false
+ },
"SnippetProject": {
"type": "object",
"properties": {