Skip to content

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

Adds some more API docs

Copple924e54895930
diff --git a/apps/reference/_api/usage.mdx b/apps/reference/_api/usage.mdx
index 53d2cd036d4..58812182c40 100644
--- a/apps/reference/_api/usage.mdx
+++ b/apps/reference/_api/usage.mdx
@@ -19,6 +19,7 @@ import TabItem from '@theme/TabItem';
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
## Lists all organizations {#lists-all-organizations}
@@ -26,6 +27,38 @@ import TabItem from '@theme/TabItem';
GET https://api.supabase.com/v1/organizations
```
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+
+### Parameters
+
+<ul className="method-list-group">
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ owned_only
+ </span>
+ <span className="method-list-item-label-badge">
+ required
+ </span>
+ <span className="method-list-item-validation">
+
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+ Only list organizations you own
+ </div>
+</li>
+
+</ul>
+
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
### Responses
@@ -83,6 +116,7 @@ Unexpected error listing organizations
<br />
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
## Creates an organization {#creates-an-organization}
@@ -90,6 +124,33 @@ Unexpected error listing organizations
POST https://api.supabase.com/v1/organizations
```
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+
+### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ }
+}
+```
+
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
### Responses
@@ -146,6 +207,7 @@ Unexpected error creating an organization
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
## Gets all projects that belong to the authenticated user {#gets-all-projects-that-belong-to-the-authenticated-user}
@@ -153,6 +215,15 @@ Unexpected error creating an organization
GET https://api.supabase.com/v1/projects
```
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
### Responses
@@ -210,6 +281,7 @@ GET https://api.supabase.com/v1/projects
<br />
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
## Creates a project {#creates-a-project}
@@ -217,6 +289,67 @@ GET https://api.supabase.com/v1/projects
POST https://api.supabase.com/v1/projects
```
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+
+### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "db_pass": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "organization_id": {
+ "type": "string"
+ },
+ "plan": {
+ "type": "string",
+ "enum": [
+ "free",
+ "pro"
+ ]
+ },
+ "region": {
+ "type": "string",
+ "enum": [
+ "us-east-1",
+ "us-west-1",
+ "ap-southeast-1",
+ "ap-northeast-1",
+ "ap-northeast-2",
+ "ap-southeast-2",
+ "eu-west-1",
+ "eu-west-2",
+ "eu-central-1",
+ "ca-central-1",
+ "ap-south-1",
+ "sa-east-1"
+ ]
+ }
+ },
+ "required": [
+ "db_pass",
+ "name",
+ "organization_id",
+ "plan",
+ "region"
+ ]
+ }
+}
+```
+
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
### Responses
diff --git a/apps/reference/src/css/custom.scss b/apps/reference/src/css/custom.scss
index 0758f85f77d..a3b81d3bcdf 100644
--- a/apps/reference/src/css/custom.scss
+++ b/apps/reference/src/css/custom.scss
@@ -241,3 +241,76 @@ html {
.token.doc-comment.class-name {
@apply text-green-500;
}
+
+
+.method-list-group {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+
+.method-list-group li {
+ border-top: 1px solid var(--custom-border-color);
+ padding-top: 12px;
+}
+
+.method-list-group li:last-child {
+ border-bottom: 1px solid var(--custom-border-color);
+}
+
+h4.method-list-item-label {
+ display: flex;
+}
+
+h4.method-list-item-label .method-list-item-label-name {
+ font-family: var(--ifm-font-family-monospace);
+ font-size: 0.8rem;
+ margin-right: 4px;
+ padding: var(--ifm-code-padding-vertical) 0;
+}
+
+h4.method-list-item-label .method-list-item-label-badge {
+ font-family: var(--ifm-font-family-monospace);
+ font-size: 0.8rem;
+ padding: 0 5px;
+ font-weight: 300;
+ padding: var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal);
+}
+
+h4.method-list-item-label .method-list-item-validation {
+ font-family: var(--ifm-font-family-monospace);
+ font-size: 0.8rem;
+ padding: 0 5px;
+ font-weight: 300;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 6px;
+}
+
+.method-list-group .method-list-group {
+ border: 1px solid var(--custom-border-color);
+ border-radius: 8px;
+ margin-bottom: 20px;
+ max-width: 600px;
+}
+
+.method-list-group .method-list-group li {
+ padding: 12px;
+ border-bottom: none;
+}
+
+.method-list-title {
+ margin: 0;
+ padding: 6px 12px;
+}
+
+.method-list-group .method-list-group li div,
+.method-list-group .method-list-group li h4,
+.method-list-group .method-list-group li p {
+ padding: 0;
+ margin: 0;
+}
+
+.method-list-group .method-list-group li h4 {
+ margin-bottom: 4px;
+}
\ No newline at end of file
diff --git a/packages/spec/src/docs/api.ts b/packages/spec/src/docs/api.ts
index faa08c09145..d30d62dbba7 100644
--- a/packages/spec/src/docs/api.ts
+++ b/packages/spec/src/docs/api.ts
@@ -43,7 +43,6 @@ async function gen_v3(
dest: string,
{ apiUrl }: { apiUrl: string }
) {
- console.log('apiUrl', apiUrl)
const paths = Object.entries(spec.paths).map(([key, path], i) => {
const fullPath = `${apiUrl}${key}`
return {
diff --git a/packages/spec/src/docs/templates/ApiTemplate.ts b/packages/spec/src/docs/templates/ApiTemplate.ts
index 0e61f4238ec..d25135c64c7 100644
--- a/packages/spec/src/docs/templates/ApiTemplate.ts
+++ b/packages/spec/src/docs/templates/ApiTemplate.ts
@@ -20,6 +20,7 @@ import TabItem from '@theme/TabItem';
<% paths.forEach(function(path){ %>
<% path.operationList.forEach(function(operation){ %>
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
## <%- operation.summary %> {#<%- operation.operationId %>}
@@ -27,6 +28,44 @@ import TabItem from '@theme/TabItem';
<%- operation.operation.toUpperCase() %> <%- path.fullPath %>
\`\`\`
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+<% if(operation.parameters && operation.parameters.length){ %>
+### Parameters
+
+<ul className="method-list-group">
+<% operation.parameters.forEach(function(parameter){ %>
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ <%- parameter.name %>
+ </span>
+ <span className="method-list-item-label-badge">
+ <%- parameter.required ? 'required' : 'optional' %>
+ </span>
+ <span className="method-list-item-validation">
+ <%- parameter.type %>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+ <%- parameter.description %>
+ </div>
+</li>
+<% }); %>
+</ul>
+<% }; %>
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
+
+<% if(operation.requestBody?.content && operation.requestBody?.content['application/json']){ %>
+### Body
+
+\`\`\`json
+<%- JSON.stringify(operation.requestBody?.content['application/json'], null, 2) %>
+\`\`\`
+<% }; %>
+
+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->
### Responses