prisma.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
Backups
list
backups.list
List backups for a database
Risk: read
await corsair.prisma.api.backups.list({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | Yes | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
databaseId?: string,
status?: string,
createdAt?: string
} | {
id: string,
databaseId?: string,
status?: string,
createdAt?: string
}[] | {
items: {
id: string,
databaseId?: string,
status?: string,
createdAt?: string
}[]
} | {
data: {
id: string,
databaseId?: string,
status?: string,
createdAt?: string
} | {
id: string,
databaseId?: string,
status?: string,
createdAt?: string
}[]
}
restore
backups.restore
Restore a backup onto the target database (async, overwrites current data)
Risk: destructive · Irreversible
await corsair.prisma.api.backups.restore({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | Yes | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | object | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
body full type
body full type
{
backupId: string
}
object
Output full type
Output full type
undefined | null | {
}
Connections
create
connections.create
Create a connection (returns a ready-to-use connection string)
Risk: write
await corsair.prisma.api.connections.create({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | object | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
body full type
body full type
{
name: string,
databaseId: string
}
object
Output full type
Output full type
{
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
} | {
data: {
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
}
} | {
project: {
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
}
} | {
database: {
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
}
} | {
connection: {
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
}
}
delete
connections.delete
Delete/revoke a connection and access for anything using it
Risk: destructive · Irreversible
await corsair.prisma.api.connections.delete({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | Yes | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
undefined | null | {
}
list
connections.list
List connections
Risk: read
await corsair.prisma.api.connections.list({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
} | {
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
}[] | {
items: {
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
}[]
} | {
data: {
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
} | {
id: string,
name?: string,
databaseId?: string,
connectionString?: string,
type?: string,
createdAt?: string
}[]
}
Databases
create
databases.create
Create a database in a project
Risk: write
await corsair.prisma.api.databases.create({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | Yes | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | object | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
body full type
body full type
{
name: string,
region: string,
isDefault?: boolean
}
object
Output full type
Output full type
{
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
} | {
data: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}
} | {
project: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}
} | {
database: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}
} | {
connection: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}
}
delete
databases.delete
Delete a database and all of its data
Risk: destructive · Irreversible
await corsair.prisma.api.databases.delete({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | Yes | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
undefined | null | {
}
get
databases.get
Retrieve database details
Risk: read
await corsair.prisma.api.databases.get({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | Yes | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
} | {
data: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}
} | {
project: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}
} | {
database: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}
} | {
connection: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}
}
getUsage
databases.getUsage
Retrieve database usage metrics for a time period
Risk: read
await corsair.prisma.api.databases.getUsage({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | Yes | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
databaseId?: string,
id?: string,
startDate?: string,
endDate?: string,
storage?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
operations?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
reads?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
writes?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
totalOperations?: number,
metrics?: {
timestamp?: string,
value?: number
}[] | {
}
} | {
data: {
databaseId?: string,
id?: string,
startDate?: string,
endDate?: string,
storage?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
operations?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
reads?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
writes?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
totalOperations?: number,
metrics?: {
timestamp?: string,
value?: number
}[] | {
}
}
} | {
usage: {
databaseId?: string,
id?: string,
startDate?: string,
endDate?: string,
storage?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
operations?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
reads?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
writes?: number | {
reads?: number,
writes?: number,
total?: number,
bytes?: number,
history?: {
timestamp?: string,
value?: number
}[]
},
totalOperations?: number,
metrics?: {
timestamp?: string,
value?: number
}[] | {
}
}
} | {
timestamp?: string,
value?: number
}[] | {
data: {
timestamp?: string,
value?: number
}[]
}
inspectSchema
databases.inspectSchema
Inspect a database schema (tables, columns, types, constraints)
Risk: read
await corsair.prisma.api.databases.inspectSchema({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
host | string | Yes | — |
port | number | No | — |
user | string | Yes | — |
password | string | Yes | — |
database | string | Yes | — |
sslRejectUnauthorized | boolean | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
| Name | Type | Required | Description |
|---|---|---|---|
tables | object[] | Yes | — |
tables full type
tables full type
{
schema: string,
name: string,
columns: {
name: string,
type: string,
nullable: boolean,
default?: string | null
}[],
foreignKeys: {
column: string,
foreignTable: string,
foreignColumn: string
}[]
}[]
list
databases.list
List databases for a project
Risk: read
await corsair.prisma.api.databases.list({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | Yes | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
} | {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[] | {
items: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
} | {
data: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
} | {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
Integrations
list
integrations.list
List integrations (OAuth clients, granted scopes) for a workspace
Risk: read
await corsair.prisma.api.integrations.list({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
name?: string,
workspaceId?: string,
type?: string
} | {
id: string,
name?: string,
workspaceId?: string,
type?: string
}[] | {
items: {
id: string,
name?: string,
workspaceId?: string,
type?: string
}[]
} | {
data: {
id: string,
name?: string,
workspaceId?: string,
type?: string
} | {
id: string,
name?: string,
workspaceId?: string,
type?: string
}[]
}
Projects
create
projects.create
Create a project and its default/database environment
Risk: write
await corsair.prisma.api.projects.create({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | object | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
body full type
body full type
{
name: string,
displayName?: string,
region: string,
createDatabase?: boolean
}
object
Output full type
Output full type
{
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
} | {
data: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
project: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
database: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
connection: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
}
delete
projects.delete
Delete a project and all of its data
Risk: destructive · Irreversible
await corsair.prisma.api.projects.delete({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | Yes | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
undefined | null | {
}
get
projects.get
Retrieve project details
Risk: read
await corsair.prisma.api.projects.get({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | Yes | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
} | {
data: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
project: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
database: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
connection: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
}
list
projects.list
List projects the token has access to
Risk: read
await corsair.prisma.api.projects.list({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
} | {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}[] | {
items: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}[]
} | {
data: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
} | {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}[]
}
transfer
projects.transfer
Transfer a project to another workspace
Risk: write
await corsair.prisma.api.projects.transfer({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | Yes | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | object | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
body full type
body full type
{
recipientAccessToken: string
}
object
Output full type
Output full type
{
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
} | {
data: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
project: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
database: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
} | {
connection: {
id: string,
createdAt?: string,
name?: string,
displayName?: string | null,
workspaceId?: string,
region?: string,
logicalId?: string,
databases?: {
id: string,
createdAt?: string,
name?: string,
connectionString?: string,
region?: string,
status?: string,
isDefault?: boolean,
apiKeys?: {
id: string,
createdAt?: string,
apiKey?: string,
connectionString?: string,
ppgDirectConnection?: {
host?: string,
user?: string,
pass?: string
}
}[]
}[]
}
}
Regions
list
regions.list
List all available regions across products (optionally by product)
Risk: read
await corsair.prisma.api.regions.list({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
} | {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[] | {
items: {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[]
} | {
data: {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
} | {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[]
}
listAccelerate
regions.listAccelerate
List all available Prisma Accelerate regions
Risk: read
await corsair.prisma.api.regions.listAccelerate({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
} | {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[] | {
items: {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[]
} | {
data: {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
} | {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[]
}
listPostgres
regions.listPostgres
List all available Prisma Postgres regions with availability
Risk: read
await corsair.prisma.api.regions.listPostgres({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
} | {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[] | {
items: {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[]
} | {
data: {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
} | {
id: string,
region?: string,
name?: string,
displayName?: string,
available?: boolean,
status?: string,
product?: string
}[]
}
Sql
execute
sql.execute
Execute a SQL command (INSERT/UPDATE/DELETE/DDL) over the Postgres connection
Risk: destructive · Irreversible
await corsair.prisma.api.sql.execute({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
host | string | Yes | — |
port | number | No | — |
user | string | Yes | — |
password | string | Yes | — |
database | string | Yes | — |
sslRejectUnauthorized | boolean | No | — |
sql | string | Yes | — |
params | any[] | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
| Name | Type | Required | Description |
|---|---|---|---|
rows | object[] | Yes | — |
rowCount | number | No | — |
command | string | Yes | — |
rows full type
rows full type
{
}[]
query
sql.query
Execute a read-only SQL query (SELECT) over the Postgres connection
Risk: read
await corsair.prisma.api.sql.query({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
host | string | Yes | — |
port | number | No | — |
user | string | Yes | — |
password | string | Yes | — |
database | string | Yes | — |
sslRejectUnauthorized | boolean | No | — |
sql | string | Yes | — |
params | any[] | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
| Name | Type | Required | Description |
|---|---|---|---|
rows | object[] | Yes | — |
rowCount | number | No | — |
command | string | Yes | — |
rows full type
rows full type
{
}[]
Workspaces
list
workspaces.list
List workspaces the token can access
Risk: read
await corsair.prisma.api.workspaces.list({});
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | — |
projectId | string | No | — |
databaseId | string | No | — |
connectionId | string | No | — |
targetDatabaseId | string | No | — |
backupId | string | No | — |
regionId | string | No | — |
cursor | string | No | — |
limit | number | No | — |
startDate | string | No | — |
endDate | string | No | — |
query | object | No | — |
headers | object | No | — |
baseUrl | string | No | — |
body | undefined | No | — |
query full type
query full type
{
}
headers full type
headers full type
{
}
object
Output full type
Output full type
{
id: string,
name?: string
} | {
id: string,
name?: string
}[] | {
items: {
id: string,
name?: string
}[]
} | {
data: {
id: string,
name?: string
} | {
id: string,
name?: string
}[]
}