diff --git a/.github/workflows/sync-management-api-docs.yml b/.github/workflows/sync-management-api-docs.yml
index bd7143263d..17b4305f25 100644
--- a/.github/workflows/sync-management-api-docs.yml
+++ b/.github/workflows/sync-management-api-docs.yml
@@ -35,6 +35,9 @@ jobs:
working-directory: apps/docs
run: pnpm fetch-openapi
+ - name: Clean stale endpoint files
+ run: find apps/docs/content/docs/management-api/endpoints -name '*.mdx' -type f -delete
+
- name: Generate docs
working-directory: apps/docs
run: pnpm tsx scripts/generate-docs.ts
@@ -51,6 +54,19 @@ jobs:
git status --short -- apps/docs/content/docs/management-api/
fi
+ - name: Validate links
+ if: steps.changes.outputs.changed == 'true'
+ run: pnpm run lint:links
+
+ - name: Validate spelling
+ if: steps.changes.outputs.changed == 'true'
+ run: pnpm run lint:spellcheck
+
+ - name: Build docs
+ if: steps.changes.outputs.changed == 'true'
+ working-directory: apps/docs
+ run: pnpm exec next build
+
- name: Commit and push
if: steps.changes.outputs.changed == 'true'
run: |
@@ -61,4 +77,5 @@ jobs:
git push "https://x-access-token:${{ secrets.BOT_TOKEN_DOCS_COMMIT }}@github.com/${{ github.repository }}.git" HEAD:${{ github.ref_name }}
- name: Trigger Vercel deploy
+ if: steps.changes.outputs.changed == 'true'
run: curl --fail -X POST "${{ secrets.VERCEL_DEPLOY_HOOK_URL }}"
diff --git a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx b/apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx
similarity index 67%
rename from apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx
rename to apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx
index 836146fcef..758a028880 100644
--- a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Deletes the connection with the given ID.
+url: /management-api/endpoints/connections/delete-connections-by-id
+metaTitle: 'DELETE /v1/connections/{id} | Delete connection - Prisma Postgres'
+metaDescription: 'Management API: Deletes the connection with the given ID. DELETE /v1/connections/{id}.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx
new file mode 100644
index 0000000000..38f5eca7b2
--- /dev/null
+++ b/apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx
@@ -0,0 +1,21 @@
+---
+title: Get connection
+full: true
+_openapi:
+ path: "/v1/connections/{id}"
+ method: GET
+ toc: []
+ structuredData:
+ headings: []
+ contents:
+ - content: Returns the connection with the given ID.
+url: /management-api/endpoints/connections/get-connections-by-id
+metaTitle: 'GET /v1/connections/{id} | Get connection - Prisma Postgres'
+metaDescription: 'Management API: Returns the connection with the given ID. GET /v1/connections/{id}.'
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+Returns the connection with the given ID.
+
+
\ No newline at end of file
diff --git a/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx b/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx
index 4d24ec18b5..b864bc4351 100644
--- a/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx
@@ -1,18 +1,23 @@
---
-title: Get connection
+title: List connections
full: true
_openapi:
- path: "/v1/connections/{id}"
+ path: "/v1/connections"
method: GET
toc: []
structuredData:
headings: []
contents:
- - content: Returns the connection with the given ID.
+ - content: >-
+ Returns all connections the actor has access to, with optional
+ database filter.
+url: /management-api/endpoints/connections/get-connections
+metaTitle: 'GET /v1/connections | List connections - Prisma Postgres'
+metaDescription: 'Management API: Returns all connections the actor has access to, with optional database filter. GET /v1/connections.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
-Returns the connection with the given ID.
+Returns all connections the actor has access to, with optional database filter.
-age document={"management-api"} operations={[{"path":"/v1/connections","method":"get"}]} />
\ No newline at end of file
+
\ No newline at end of file
diff --git a/apps/docs/content/docs/management-api/endpoints/connections/meta.json b/apps/docs/content/docs/management-api/endpoints/connections/meta.json
new file mode 100644
index 0000000000..1dc1db82c6
--- /dev/null
+++ b/apps/docs/content/docs/management-api/endpoints/connections/meta.json
@@ -0,0 +1,9 @@
+{
+ "title": "Connections",
+ "pages": [
+ "get-connections",
+ "get-connections-by-id",
+ "post-connections",
+ "delete-connections-by-id"
+ ]
+}
diff --git a/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx b/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx
index 4c09b1d19a..7b5507ce5f 100644
--- a/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Creates a new connection for the specified database.
+url: /management-api/endpoints/connections/post-connections
+metaTitle: 'POST /v1/connections | Create connection - Prisma Postgres'
+metaDescription: 'Management API: Creates a new connection for the specified database. POST /v1/connections.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx b/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx
index 1279af6eac..7c18728f0b 100644
--- a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Returns backups for the specified database.
+url: /management-api/endpoints/database-backups/get-databases-id-backups
+metaTitle: 'GET /v1/databases/{databaseId}/backups | Get list of backups - Prisma Postgres'
+metaDescription: 'Management API: Returns backups for the specified database. GET /v1/databases/{databaseId}/backups.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx b/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx
index 6ec21de90c..d38c50f002 100644
--- a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Returns usage metrics for the specified database.
+url: /management-api/endpoints/database-usage/get-databases-id-usage
+metaTitle: 'GET /v1/databases/{databaseId}/usage | Get database usage metrics - Prisma Postgres'
+metaDescription: 'Management API: Returns usage metrics for the specified database. GET /v1/databases/{databaseId}/usage.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/delete-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/delete-connections.mdx
deleted file mode 100644
index 331540164e..0000000000
--- a/apps/docs/content/docs/management-api/endpoints/databases-connections/delete-connections.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
----
-title: Delete database connection string
-metaTitle: DELETE /v1/connections/{id} | Remove Connection String
-metaDescription: 'Management API: Deletes the database connection string with the given ID. DELETE /v1/connections/{id}.'
-full: true
-_openapi:
- path: '/v1/connections/{id}'
- method: DELETE
- toc: []
- structuredData:
- headings: []
- contents:
- - content: Deletes the database connection string with the given ID.
-url: /management-api/endpoints/databases-connections/delete-connections
----
-
-{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
-
-Deletes the database connection string with the given ID.
-
-
diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx
index b286f5a7d7..3e7fdaf2c4 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Returns all connections for the given database.
+url: /management-api/endpoints/databases-connections/get-databases-id-connections
+metaTitle: 'GET /v1/databases/{databaseId}/connections | Get list of database connections - Prisma Postgres'
+metaDescription: 'Management API: Returns all connections for the given database. GET /v1/databases/{databaseId}/connections.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/meta.json b/apps/docs/content/docs/management-api/endpoints/databases-connections/meta.json
index f1a4e0604c..621b9ccb97 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases-connections/meta.json
+++ b/apps/docs/content/docs/management-api/endpoints/databases-connections/meta.json
@@ -1,4 +1,4 @@
{
- "title": "Connections",
- "pages": ["get-databases-id-connections", "post-databases-id-connections", "delete-connections"]
+ "title": "Database Connections",
+ "pages": ["get-databases-id-connections", "post-databases-id-connections"]
}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx
index b02f15ad21..0bb51c61c0 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Creates a new connection string for the given database.
+url: /management-api/endpoints/databases-connections/post-databases-id-connections
+metaTitle: 'POST /v1/databases/{databaseId}/connections | Create database connection string - Prisma Postgres'
+metaDescription: 'Management API: Creates a new connection string for the given database. POST /v1/databases/{databaseId}/connections.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx
index 76902f2ac0..e7b2dde088 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Deletes the database with the given ID.
+url: /management-api/endpoints/databases/delete-databases-id
+metaTitle: 'DELETE /v1/databases/{databaseId} | Delete database - Prisma Postgres'
+metaDescription: 'Management API: Deletes the database with the given ID. DELETE /v1/databases/{databaseId}.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx
index 55ec10d108..2a5fdba116 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Returns the database with the given ID.
+url: /management-api/endpoints/databases/get-databases-id
+metaTitle: 'GET /v1/databases/{databaseId} | Get database - Prisma Postgres'
+metaDescription: 'Management API: Returns the database with the given ID. GET /v1/databases/{databaseId}.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx
index 4ed40935fa..f0ebcc4b5d 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx
@@ -11,6 +11,9 @@ _openapi:
- content: >-
Returns all databases the token has access to. Optionally filter by
project ID.
+url: /management-api/endpoints/databases/get-databases
+metaTitle: 'GET /v1/databases | List databases - Prisma Postgres'
+metaDescription: 'Management API: Returns all databases the token has access to. Optionally filter by project ID. GET /v1/databases.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx
index 6602a6cb2b..403b201b0c 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Returns databases for the given project.
+url: /management-api/endpoints/databases/get-projects-id-databases
+metaTitle: 'GET /v1/projects/{projectId}/databases | Get list of databases - Prisma Postgres'
+metaDescription: 'Management API: Returns databases for the given project. GET /v1/projects/{projectId}/databases.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases/meta.json b/apps/docs/content/docs/management-api/endpoints/databases/meta.json
index 5505a1f046..00fafe8ded 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases/meta.json
+++ b/apps/docs/content/docs/management-api/endpoints/databases/meta.json
@@ -1,9 +1,12 @@
{
"title": "Databases",
"pages": [
- "get-projects-id-databases",
+ "get-databases",
"get-databases-id",
+ "post-databases",
"post-projects-id-databases",
+ "get-projects-id-databases",
+ "patch-databases-id",
"delete-databases-id"
]
}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx
index eb82b54010..ae0b289e26 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Updates the database with the given ID.
+url: /management-api/endpoints/databases/patch-databases-id
+metaTitle: 'PATCH /v1/databases/{databaseId} | Update database - Prisma Postgres'
+metaDescription: 'Management API: Updates the database with the given ID. PATCH /v1/databases/{databaseId}.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx
index bbf284e61b..519b8d9dfe 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Creates a new database in the specified project.
+url: /management-api/endpoints/databases/post-databases
+metaTitle: 'POST /v1/databases | Create database - Prisma Postgres'
+metaDescription: 'Management API: Creates a new database in the specified project. POST /v1/databases.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx
index 1d75bbc864..b30ad8d837 100644
--- a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Creates a new database for the given project.
+url: /management-api/endpoints/databases/post-projects-id-databases
+metaTitle: 'POST /v1/projects/{projectId}/databases | Create database - Prisma Postgres'
+metaDescription: 'Management API: Creates a new database for the given project. POST /v1/projects/{projectId}/databases.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx
similarity index 66%
rename from apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx
rename to apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx
index 42ff94b1e4..529368bee5 100644
--- a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Revokes the integration tokens by integration ID.
+url: /management-api/endpoints/integrations/delete-integrations-by-id
+metaTitle: 'DELETE /v1/integrations/{id} | Delete integration - Prisma Postgres'
+metaDescription: 'Management API: Revokes the integration tokens by integration ID. DELETE /v1/integrations/{id}.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx
index b46ef61e8a..3799044c2b 100644
--- a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Revokes the integration tokens with the given client ID.
+url: /management-api/endpoints/integrations/delete-workspaces-id-integrations-id
+metaTitle: 'DELETE /v1/workspaces/{workspaceId}/integrations/{clientId} | Revoke integration tokens - Prisma Postgres'
+metaDescription: 'Management API: Revokes the integration tokens with the given client ID. DELETE /v1/workspaces/{workspaceId}/integrations/{clientId}.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx
new file mode 100644
index 0000000000..b3b4318b6f
--- /dev/null
+++ b/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx
@@ -0,0 +1,21 @@
+---
+title: Get integration by ID
+full: true
+_openapi:
+ path: "/v1/integrations/{id}"
+ method: GET
+ toc: []
+ structuredData:
+ headings: []
+ contents:
+ - content: Returns a single integration by its ID.
+url: /management-api/endpoints/integrations/get-integrations-by-id
+metaTitle: 'GET /v1/integrations/{id} | Get integration by ID - Prisma Postgres'
+metaDescription: 'Management API: Returns a single integration by its ID. GET /v1/integrations/{id}.'
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+Returns a single integration by its ID.
+
+
\ No newline at end of file
diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx
index 1fcd07acba..36639d7254 100644
--- a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx
@@ -1,18 +1,21 @@
---
-title: Get integration by ID
+title: Get list of integrations
full: true
_openapi:
- path: "/v1/integrations/{id}"
+ path: "/v1/integrations"
method: GET
toc: []
structuredData:
headings: []
contents:
- - content: Returns a single integration by its ID.
+ - content: Returns integrations filtered by workspace ID.
+url: /management-api/endpoints/integrations/get-integrations
+metaTitle: 'GET /v1/integrations | Get list of integrations - Prisma Postgres'
+metaDescription: 'Management API: Returns integrations filtered by workspace ID. GET /v1/integrations.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
-Returns a single integration by its ID.
+Returns integrations filtered by workspace ID.
-"}]} />
\ No newline at end of file
+
\ No newline at end of file
diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx
index 9e7d012187..78a4ce2137 100644
--- a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Returns integrations for the given workspace.
+url: /management-api/endpoints/integrations/get-workspaces-id-integrations
+metaTitle: 'GET /v1/workspaces/{workspaceId}/integrations | Get list of integrations - Prisma Postgres'
+metaDescription: 'Management API: Returns integrations for the given workspace. GET /v1/workspaces/{workspaceId}/integrations.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/meta.json b/apps/docs/content/docs/management-api/endpoints/integrations/meta.json
index 4c515b9dfd..0911ecec3f 100644
--- a/apps/docs/content/docs/management-api/endpoints/integrations/meta.json
+++ b/apps/docs/content/docs/management-api/endpoints/integrations/meta.json
@@ -1,4 +1,10 @@
{
"title": "Integrations",
- "pages": ["get-workspaces-id-integrations", "delete-workspaces-id-integrations-id"]
+ "pages": [
+ "get-integrations",
+ "get-integrations-by-id",
+ "delete-integrations-by-id",
+ "get-workspaces-id-integrations",
+ "delete-workspaces-id-integrations-id"
+ ]
}
diff --git a/apps/docs/content/docs/management-api/endpoints/meta.json b/apps/docs/content/docs/management-api/endpoints/meta.json
index c68d6749de..ec3f2c3058 100644
--- a/apps/docs/content/docs/management-api/endpoints/meta.json
+++ b/apps/docs/content/docs/management-api/endpoints/meta.json
@@ -2,12 +2,14 @@
"title": "Endpoints",
"defaultOpen": true,
"pages": [
+ "connections",
"databases",
"database-backups",
"database-usage",
"databases-connections",
"integrations",
"projects",
+ "regions",
"workspaces",
"misc"
]
diff --git a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx b/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx
index d9af0e49e4..8e82c92a09 100644
--- a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Returns all available regions for Prisma Accelerate.
+url: /management-api/endpoints/misc/get-regions-accelerate
+metaTitle: 'GET /v1/regions/accelerate | Get Prisma Accelerate regions - Prisma Postgres'
+metaDescription: 'Management API: Returns all available regions for Prisma Accelerate. GET /v1/regions/accelerate.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx b/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx
index 6b4d919cac..33415eb9e7 100644
--- a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Returns all available regions for Prisma Postgres.
+url: /management-api/endpoints/misc/get-regions-postgres
+metaTitle: 'GET /v1/regions/postgres | Get Prisma Postgres regions - Prisma Postgres'
+metaDescription: 'Management API: Returns all available regions for Prisma Postgres. GET /v1/regions/postgres.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx
similarity index 67%
rename from apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx
rename to apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx
index bc040e2dc7..a96e79aebc 100644
--- a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Deletes the project with the given ID.
+url: /management-api/endpoints/projects/delete-projects-by-id
+metaTitle: 'DELETE /v1/projects/{id} | Delete project - Prisma Postgres'
+metaDescription: 'Management API: Deletes the project with the given ID. DELETE /v1/projects/{id}.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx
new file mode 100644
index 0000000000..8b20071692
--- /dev/null
+++ b/apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx
@@ -0,0 +1,21 @@
+---
+title: Get project
+full: true
+_openapi:
+ path: "/v1/projects/{id}"
+ method: GET
+ toc: []
+ structuredData:
+ headings: []
+ contents:
+ - content: Returns the project with the given ID.
+url: /management-api/endpoints/projects/get-projects-by-id
+metaTitle: 'GET /v1/projects/{id} | Get project - Prisma Postgres'
+metaDescription: 'Management API: Returns the project with the given ID. GET /v1/projects/{id}.'
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+Returns the project with the given ID.
+
+
\ No newline at end of file
diff --git a/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx
index 03c0c1481f..0a439c4ad5 100644
--- a/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx
@@ -1,18 +1,21 @@
---
-title: Get project
+title: Get list of projects
full: true
_openapi:
- path: "/v1/projects/{id}"
+ path: "/v1/projects"
method: GET
toc: []
structuredData:
headings: []
contents:
- - content: Returns the project with the given ID.
+ - content: Returns the list of projects the token has access to.
+url: /management-api/endpoints/projects/get-projects
+metaTitle: 'GET /v1/projects | Get list of projects - Prisma Postgres'
+metaDescription: 'Management API: Returns the list of projects the token has access to. GET /v1/projects.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
-Returns the project with the given ID.
+Returns the list of projects the token has access to.
-rojects","method":"get"}]} />
\ No newline at end of file
+
\ No newline at end of file
diff --git a/apps/docs/content/docs/management-api/endpoints/projects/meta.json b/apps/docs/content/docs/management-api/endpoints/projects/meta.json
index 3c3a194f96..ea189c7f1f 100644
--- a/apps/docs/content/docs/management-api/endpoints/projects/meta.json
+++ b/apps/docs/content/docs/management-api/endpoints/projects/meta.json
@@ -1,4 +1,11 @@
{
"title": "Projects",
- "pages": ["get-projects", "post-projects", "post-projects-transfer", "delete-projects"]
+ "pages": [
+ "get-projects",
+ "get-projects-by-id",
+ "post-projects",
+ "patch-projects-by-id",
+ "post-projects-by-id-transfer",
+ "delete-projects-by-id"
+ ]
}
diff --git a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx
similarity index 68%
rename from apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx
rename to apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx
index 2aee9664ea..1ed2d488cf 100644
--- a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Updates the project with the given ID.
+url: /management-api/endpoints/projects/patch-projects-by-id
+metaTitle: 'PATCH /v1/projects/{id} | Update project - Prisma Postgres'
+metaDescription: 'Management API: Updates the project with the given ID. PATCH /v1/projects/{id}.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx b/apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx
similarity index 66%
rename from apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx
rename to apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx
index f09794a467..ba5c7c88e0 100644
--- a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Transfer the project with the given ID to the new owner's workspace
+url: /management-api/endpoints/projects/post-projects-by-id-transfer
+metaTitle: 'POST /v1/projects/{id}/transfer | Transfer project - Prisma Postgres'
+metaDescription: 'Management API: Transfer the project with the given ID to the new owner''s workspace. POST /v1/projects/{id}/transfer.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx
index 0a9d36039b..790e25949b 100644
--- a/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx
@@ -9,6 +9,9 @@ _openapi:
headings: []
contents:
- content: Creates a new project with a postgres database.
+url: /management-api/endpoints/projects/post-projects
+metaTitle: 'POST /v1/projects | Create project with a postgres database - Prisma Postgres'
+metaDescription: 'Management API: Creates a new project with a postgres database. POST /v1/projects.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx b/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx
index d56f372311..9259ddfd07 100644
--- a/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx
@@ -11,6 +11,9 @@ _openapi:
- content: >-
Returns all available regions across products. Optionally filter by
product.
+url: /management-api/endpoints/regions/get-regions
+metaTitle: 'GET /v1/regions | Get all regions - Prisma Postgres'
+metaDescription: 'Management API: Returns all available regions across products. Optionally filter by product. GET /v1/regions.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
diff --git a/apps/docs/content/docs/management-api/endpoints/regions/meta.json b/apps/docs/content/docs/management-api/endpoints/regions/meta.json
new file mode 100644
index 0000000000..dab057deb7
--- /dev/null
+++ b/apps/docs/content/docs/management-api/endpoints/regions/meta.json
@@ -0,0 +1,4 @@
+{
+ "title": "Regions",
+ "pages": ["get-regions"]
+}
diff --git a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx
new file mode 100644
index 0000000000..5ff2962608
--- /dev/null
+++ b/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx
@@ -0,0 +1,21 @@
+---
+title: Get workspace
+full: true
+_openapi:
+ path: "/v1/workspaces/{id}"
+ method: GET
+ toc: []
+ structuredData:
+ headings: []
+ contents:
+ - content: Returns the workspace with the given ID.
+url: /management-api/endpoints/workspaces/get-workspaces-by-id
+metaTitle: 'GET /v1/workspaces/{id} | Get workspace - Prisma Postgres'
+metaDescription: 'Management API: Returns the workspace with the given ID. GET /v1/workspaces/{id}.'
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+Returns the workspace with the given ID.
+
+
\ No newline at end of file
diff --git a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx b/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx
index 1f69cc7c49..9763661105 100644
--- a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx
+++ b/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx
@@ -1,18 +1,21 @@
---
-title: Get workspace
+title: Get list of workspaces
full: true
_openapi:
- path: "/v1/workspaces/{id}"
+ path: "/v1/workspaces"
method: GET
toc: []
structuredData:
headings: []
contents:
- - content: Returns the workspace with the given ID.
+ - content: Returns the list of workspaces the current token can access.
+url: /management-api/endpoints/workspaces/get-workspaces
+metaTitle: 'GET /v1/workspaces | Get list of workspaces - Prisma Postgres'
+metaDescription: 'Management API: Returns the list of workspaces the current token can access. GET /v1/workspaces.'
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
-Returns the workspace with the given ID.
+Returns the list of workspaces the current token can access.
-":"/v1/workspaces","method":"get"}]} />
\ No newline at end of file
+
\ No newline at end of file
diff --git a/apps/docs/content/docs/management-api/endpoints/workspaces/meta.json b/apps/docs/content/docs/management-api/endpoints/workspaces/meta.json
new file mode 100644
index 0000000000..1de030811f
--- /dev/null
+++ b/apps/docs/content/docs/management-api/endpoints/workspaces/meta.json
@@ -0,0 +1,4 @@
+{
+ "title": "Workspaces",
+ "pages": ["get-workspaces", "get-workspaces-by-id"]
+}
diff --git a/apps/docs/scripts/generate-docs.ts b/apps/docs/scripts/generate-docs.ts
index f355a3c02a..bb84f45159 100644
--- a/apps/docs/scripts/generate-docs.ts
+++ b/apps/docs/scripts/generate-docs.ts
@@ -16,7 +16,7 @@ void generateFiles({
const cleanName = operationId
.replace(/V\d+/g, "")
- .replace(/By[A-Z][a-z]*/g, "")
+ .replace(/By[A-Z][a-z]{2,}/g, "")
.replace(/([a-z])([A-Z])/g, "$1-$2")
.toLowerCase();
@@ -28,29 +28,85 @@ void generateFiles({
beforeWrite(files) {
for (const file of files) {
const frontmatterMatch = file.content.match(/^---\n([\s\S]*?)\n---/);
- if (frontmatterMatch) {
- const frontmatter = frontmatterMatch[1];
- if (frontmatter.includes("_openapi:")) {
- const apiPageMatch = file.content.match(/]*operations=\{(\[.*?\])\}/s);
- if (apiPageMatch) {
- try {
- const operations = JSON.parse(apiPageMatch[1].replace(/'/g, '"'));
- if (operations[0]?.path) {
- const path = operations[0].path;
-
- const updatedFrontmatter = frontmatter.replace(
- /(_openapi:\s*\n\s*method:)/,
- `_openapi:\n path: "${path}"\n method:`,
- );
-
- file.content = file.content.replace(frontmatter, updatedFrontmatter);
- }
- } catch (e) {
- console.warn(`Failed to parse operations for ${file.path}:`, e);
- }
+ if (!frontmatterMatch) continue;
+
+ let frontmatter = frontmatterMatch[1];
+
+ const titleMatch = frontmatter.match(/^title:\s*(.+)$/m);
+ const title = titleMatch
+ ? titleMatch[1].replace(/^['"]|['"]$/g, "")
+ : "";
+
+ const methodMatch = frontmatter.match(/method:\s*(\w+)/);
+ const method = methodMatch ? methodMatch[1].toUpperCase() : "";
+
+ const apiPageMatch = file.content.match(
+ /]*operations=\{(\[.*?\])\}/s,
+ );
+ let apiPath = "";
+ if (apiPageMatch) {
+ try {
+ const operations = JSON.parse(apiPageMatch[1].replace(/'/g, '"'));
+ if (operations[0]?.path) {
+ apiPath = operations[0].path;
}
+ } catch (e) {
+ console.warn(`Failed to parse operations for ${file.path}:`, e);
}
}
+
+ const openapiBlock = frontmatter.match(
+ /_openapi:\s*\n([\s\S]*?)(?=\n[^\s]|\n?$)/,
+ );
+ const openapiHasPath = openapiBlock
+ ? /^\s*path:\s*['"]?[^'"\n]+['"]?\s*$/m.test(openapiBlock[1])
+ : false;
+
+ if (!apiPath && openapiHasPath && openapiBlock) {
+ const pathInBlock = openapiBlock[1].match(
+ /^\s*path:\s*['"]?([^'"\n]+)['"]?\s*$/m,
+ );
+ if (pathInBlock) apiPath = pathInBlock[1];
+ }
+
+ if (openapiBlock && !openapiHasPath && apiPath) {
+ frontmatter = frontmatter.replace(
+ /(_openapi:\s*\n)/,
+ `$1 path: "${apiPath}"\n`,
+ );
+ }
+
+ if (!method || !title || !apiPath) {
+ console.warn(
+ `Skipping SEO metadata for ${file.path}: missing method/title/path`,
+ );
+ file.content =
+ `---\n${frontmatter}\n---` +
+ file.content.slice(frontmatterMatch[0].length);
+ continue;
+ }
+
+ const contentAfterFrontmatter = file.content.slice(
+ frontmatterMatch[0].length,
+ );
+ const descMatch = contentAfterFrontmatter.match(/\n\n([^<\n{][^\n]+)\n/);
+ const description = descMatch ? descMatch[1].trim() : title;
+
+ const slug = file.path
+ .replace(/^.*endpoints\//, "")
+ .replace(/\.mdx$/, "");
+ const urlPath = `/management-api/endpoints/${slug}`;
+ const metaTitle = `${method} ${apiPath} | ${title} - Prisma Postgres`;
+ const descriptionClean = description.replace(/\.$/, "");
+ const metaDescription = `Management API: ${descriptionClean}. ${method} ${apiPath}.`;
+
+ frontmatter += `\nurl: ${urlPath}`;
+ frontmatter += `\nmetaTitle: '${metaTitle.replace(/'/g, "''")}'`;
+ frontmatter += `\nmetaDescription: '${metaDescription.replace(/'/g, "''")}'`;
+
+ file.content =
+ `---\n${frontmatter}\n---` +
+ file.content.slice(frontmatterMatch[0].length);
}
},
});
diff --git a/apps/docs/src/app/og/[...slug]/route.tsx b/apps/docs/src/app/og/[...slug]/route.tsx
index 69bc0779db..afef803cb4 100644
--- a/apps/docs/src/app/og/[...slug]/route.tsx
+++ b/apps/docs/src/app/og/[...slug]/route.tsx
@@ -15,11 +15,13 @@ const PrismaLogo = () => (
);
-const HTTP_METHOD_COLORS = {
+const HTTP_METHOD_COLORS: Record = {
GET: "#07DC71",
POST: "#51A2FF",
+ PUT: "#EAB308",
+ PATCH: "#EAB308",
DELETE: "#FF6467",
-} as const;
+};
function PrismaOGImage({
title,
@@ -30,7 +32,7 @@ function PrismaOGImage({
}: {
title: string;
description?: string;
- method?: "GET" | "POST" | "DELETE";
+ method?: string;
apiPath?: string;
section?: string;
}) {
@@ -57,14 +59,14 @@ function PrismaOGImage({
alignItems: "center",
justifyContent: "center",
backgroundColor: "transparent",
- color: HTTP_METHOD_COLORS[method],
- border: `3px solid ${HTTP_METHOD_COLORS[method]}`,
+ color: HTTP_METHOD_COLORS[method] ?? "#a0aec0",
+ border: `3px solid ${HTTP_METHOD_COLORS[method] ?? "#a0aec0"}`,
padding: "12px 24px",
borderRadius: 9999,
fontSize: 24,
fontFamily: "Barlow, sans-serif",
fontWeight: 700,
- boxShadow: `0 0 40px ${HTTP_METHOD_COLORS[method]}40`,
+ boxShadow: `0 0 40px ${HTTP_METHOD_COLORS[method] ?? "#a0aec0"}40`,
}}
>
{method}
@@ -200,7 +202,7 @@ export async function GET(_req: Request, { params }: RouteContext<"/og/[...slug]
const page = source.getPage(slug.slice(0, -1)) ?? sourceV6.getPage(slug.slice(0, -1));
if (!page) notFound();
- const method = (page.data as any)?._openapi?.method as "GET" | "POST" | "DELETE" | undefined;
+ const method = ((page.data as any)?._openapi?.method as string | undefined)?.toUpperCase();
const apiPath = (page.data as any)?._openapi?.path as string | undefined;
const section = page.slugs[0];