Setting the file. One moment.
Chapter 07 · Prisma Postgres Setup
Subchapter 7.1
references/api-basics.mdMarkdown3 KBView on GitHub
Core conventions for the Prisma Management API. All three prisma-postgres-* skills share these patterns.
https://api.prisma.io/v1API documentation: https://api.prisma.io/v1/doc (opens in a new tab)
{
"data": {
"id": "proj_clx7abc123def456",
"type": "project",
"name": "My Project",
"createdAt": "2025-06-15T10:30:00.000Z"
}
}{
"data": [
{ "id": "proj_aaa", "type": "project", "name": "Alpha" },
{ "id": "proj_bbb", "type": "project", "name": "Beta" }
],
"pagination": {
"hasMore": true,
"nextCursor": "clx7cursor123"
}
}Every resource ID carries a type prefix:
| Prefix | Resource |
|---|---|
proj_ | Project |
db_ | Database |
con_ | Connection |
wksp_ | Workspace |
Always include the prefix when sending IDs in API requests.
Collection endpoints use cursor-based pagination:
GET /v1/projects?limit=10
GET /v1/projects?cursor=clx7abc123&limit=10| Parameter | Type | Default | Description |
|---|---|---|---|
cursor | string | — | Opaque cursor from nextCursor |
limit | number | 100 | Maximum items per page |
Continue fetching while pagination.hasMore is true, using pagination.nextCursor as the cursor parameter.
All errors follow this shape:
{
"error": {
"code": "resource-not-found",
"message": "database with id db_abc not found"
}
}| HTTP Status | Error Code | Meaning |
|---|---|---|
| 400 | client-error | Malformed request |
| 401 | authentication-failed | Missing or invalid token |
| 403 | permission-denied | Token lacks required access |
| 404 | resource-not-found | Resource does not exist or is not accessible |
| 422 | validation-error | Request body failed validation |
| 429 | rate-limit-exceeded | Too many requests |
| 500 | internal-server-error | Server error — retry after a delay |
proj_, db_, con_). Use GET /v1/projects or GET /v1/databases to list available resources.name.