跳到正文

托管数据库

托管 Postgres,运行在 infrai 自营数据库集群上:预置项目、写时复制分支与时间点快照,一把 key 打通。

1. 概览

基础路径: https://api.infrai.cc/v1/db
鉴权头: Authorization: Bearer $INFRAI_API_KEY
bash
# Call any /v1/db capability over raw HTTP — no SDK to install.
# curl:
curl https://api.infrai.cc/v1/db/... \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json"

2. 方法 (12)

2.1db.project.create

POST /v1/db/project/create

在 infrai 自营数据库集群上预置一个托管 Postgres 项目。

参数

名称类型必填说明
namestring
必填
数据库项目名称。
≥ 1 chars
vendor"tencent_pg" | null可选可选的显式 vendor 锁定。
regionstring可选预置所在区域。
default: "us-east-1"
plan"hobby" | "pro" | "scale"可选预置套餐 / 规格。
default: "hobby"
mode"default_vendor" | "verified_account"可选预置模式——managed。
default: "default_vendor"
postgres_versionstring可选Postgres 主版本。
default: "15"
idempotency_keystring可选客户端提供的幂等键。

返回

Project { id, name, region, connection_uri, created_at }
名称类型说明
project_idstring父 db 项目的唯一标识符
db_idstringdatabase instance的唯一标识符
pattern: ^dbi_[A-Za-z0-9]{20,}$
namestring资源的可读名称
vendorstring处理此请求的供应商
regionstring | null资源所在或处理的地理区域
plan"hobby" | "pro" | "scale"数据库实例定价方案
state"provisioning" | "active" | "paused" | "deleting" | "deleted" | "failed"当前生命周期状态
postgres_versionstring | null例如 "15.4"。
created_atstring资源创建时间(ISO 8601)
format: date-time
primary_branchstring | null主分支名称
default: "main"
mode"default_vendor" | "verified_account"投递模式或操作模式
vendor_db_idstring物理数据库的供应商侧标识符
metadataobject创建时记录的请求计量元数据
metadata.request_idstring-
metadata.timestampstring-
format: date-time
metadata.latency_msinteger-
≥ 0
metadata.entry_formstring-
metadata.cost_usdnumber-
metadata.vendorstring-
metadata.vendor_regionstring-
metadata.markup_pctnumber-
metadata.trace_idstring-
metadata.modestring-

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X POST https://api.infrai.cc/v1/db/project/create \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "example"}'

2.2db.project.get

GET /v1/db/project/get/{project_id}

按 id 获取托管数据库项目,含连接 URI。

参数

名称类型必填说明
idstring
必填
项目 id。

返回

Project
名称类型说明
project_idstring父 db 项目的唯一标识符
db_idstringdatabase instance的唯一标识符
pattern: ^dbi_[A-Za-z0-9]{20,}$
namestring资源的可读名称
vendorstring处理此请求的供应商
regionstring | null资源所在或处理的地理区域
plan"hobby" | "pro" | "scale"数据库实例定价方案
state"provisioning" | "active" | "paused" | "deleting" | "deleted" | "failed"当前生命周期状态
postgres_versionstring | null例如 "15.4"。
created_atstring资源创建时间(ISO 8601)
format: date-time
primary_branchstring | null主分支名称
default: "main"
mode"default_vendor" | "verified_account"投递模式或操作模式
vendor_db_idstring物理数据库的供应商侧标识符
metadataobject创建时记录的请求计量元数据
metadata.request_idstring-
metadata.timestampstring-
format: date-time
metadata.latency_msinteger-
≥ 0
metadata.entry_formstring-
metadata.cost_usdnumber-
metadata.vendorstring-
metadata.vendor_regionstring-
metadata.markup_pctnumber-
metadata.trace_idstring-
metadata.modestring-

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/db/project/get/PROJECT_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.3db.project.list

GET /v1/db/project/list

列出账户下的托管数据库项目。

参数

名称类型必填说明
cursorstring可选不透明分页游标。
limitnumber可选返回条目的最大数量。

返回

{ items: Project[], next_cursor?: string }
名称类型说明
itemsobject[]database project records列表
next_cursorstring | null下一页游标;null 表示最后一页
totalinteger此账户的 db 项目总数
≥ 0

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/db/project/list \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.4db.project.delete

DELETE /v1/db/project/delete/{project_id}

删除托管数据库项目及其全部分支 / 快照。

参数

名称类型必填说明
idstring
必填
项目 id。

返回

{ ok: boolean }
名称类型说明
project_idstring父 db 项目的唯一标识符
db_idstringdatabase instance的唯一标识符
pattern: ^dbi_[A-Za-z0-9]{20,}$
namestring资源的可读名称
vendorstring处理此请求的供应商
regionstring | null资源所在或处理的地理区域
plan"hobby" | "pro" | "scale"数据库实例定价方案
state"provisioning" | "active" | "paused" | "deleting" | "deleted" | "failed"当前生命周期状态
postgres_versionstring | null例如 "15.4"。
created_atstring资源创建时间(ISO 8601)
format: date-time
primary_branchstring | null主分支名称
default: "main"
mode"default_vendor" | "verified_account"投递模式或操作模式
vendor_db_idstring物理数据库的供应商侧标识符
metadataobject创建时记录的请求计量元数据
metadata.request_idstring-
metadata.timestampstring-
format: date-time
metadata.latency_msinteger-
≥ 0
metadata.entry_formstring-
metadata.cost_usdnumber-
metadata.vendorstring-
metadata.vendor_regionstring-
metadata.markup_pctnumber-
metadata.trace_idstring-
metadata.modestring-

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X DELETE https://api.infrai.cc/v1/db/project/delete/PROJECT_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.5db.branch.create

POST /v1/db/branch/create

为项目创建写时复制分支,用于预览或测试。

参数

名称类型必填说明
project_idstring
必填
项目 id。
branch_namestring
必填
新分支名称。
≥ 1 chars
from_branchstring可选用于克隆的源分支。
default: "main"
idempotency_keystring可选客户端提供的幂等键。

返回

Branch { id, branch_name, project_id, connection_uri }
名称类型说明
db_idstringdatabase instance的唯一标识符
pattern: ^dbi_[A-Za-z0-9]{20,}$
branch_namestring数据库分支名称
parentstring | null父分支名称
default: "main"
created_atstring资源创建时间(ISO 8601)
format: date-time
state"creating" | "active" | "promoting" | "failed" | "deleted"当前生命周期状态

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X POST https://api.infrai.cc/v1/db/branch/create \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project_id": "sample", "branch_name": "example"}'

2.6db.branch.get

GET /v1/db/branch/get/{project_id}

按 id 获取数据库分支,含连接 URI。

参数

名称类型必填说明
idstring
必填
分支 id。

返回

Branch
名称类型说明
db_idstringdatabase instance的唯一标识符
pattern: ^dbi_[A-Za-z0-9]{20,}$
branch_namestring数据库分支名称
parentstring | null父分支名称
default: "main"
created_atstring资源创建时间(ISO 8601)
format: date-time
state"creating" | "active" | "promoting" | "failed" | "deleted"当前生命周期状态

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/db/branch/get/PROJECT_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.7db.branch.list

GET /v1/db/branch/list

列出托管数据库项目的分支。

参数

名称类型必填说明
project_idstring可选项目 id。
cursorstring可选不透明分页游标。
limitnumber可选返回条目的最大数量。

返回

{ items: Branch[], next_cursor?: string }
名称类型说明
itemsobject[]database branch records列表
next_cursorstring | null下一页游标;null 表示最后一页

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/db/branch/list \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.8db.branch.delete

DELETE /v1/db/branch/delete/{project_id}

删除数据库分支。

参数

名称类型必填说明
idstring
必填
分支 id。

返回

{ ok: boolean }
名称类型说明
db_idstringdatabase instance的唯一标识符
pattern: ^dbi_[A-Za-z0-9]{20,}$
branch_namestring数据库分支名称
parentstring | null父分支名称
default: "main"
created_atstring资源创建时间(ISO 8601)
format: date-time
state"creating" | "active" | "promoting" | "failed" | "deleted"当前生命周期状态

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X DELETE https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.9db.snapshot.create

POST /v1/db/snapshot/create

为托管数据库项目创建一次时间点快照。

参数

名称类型必填说明
project_idstring
必填
项目 id。
labelstring可选可读的快照标签。
idempotency_keystring可选客户端提供的幂等键。

返回

Snapshot { id, project_id, label?, created_at }
名称类型说明
snapshot_idstringsnapshot的唯一标识符
project_idstring此快照所属的 db 项目标识符
db_idstringdatabase instance的唯一标识符
labelstring | null风险标签(如 low、medium、high)
size_bytesinteger | null资源大小(字节)
≥ 0
created_atstring资源创建时间(ISO 8601)
format: date-time
state"creating" | "ready" | "restoring" | "failed" | "expired"当前生命周期状态
vendorstring处理底层数据库的供应商(db.snapshot.get 上存在)
_tierstring由资产存储标记的存储保留层级(db.snapshot.get 上存在)
expires_atstring所存转储的 ISO 8601 过期时间戳(db.snapshot.get 上存在)
format: date-time
_account_idstring由资产存储标记的所属账户标识符(db.snapshot.get 上存在)

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X POST https://api.infrai.cc/v1/db/snapshot/create \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project_id": "sample"}'

2.10db.snapshot.get

GET /v1/db/snapshot/get/{snapshot_id}

按 id 获取数据库快照。

参数

名称类型必填说明
idstring
必填
快照 id。

返回

Snapshot
名称类型说明
snapshot_idstringsnapshot的唯一标识符
project_idstring此快照所属的 db 项目标识符
db_idstringdatabase instance的唯一标识符
labelstring | null风险标签(如 low、medium、high)
size_bytesinteger | null资源大小(字节)
≥ 0
created_atstring资源创建时间(ISO 8601)
format: date-time
state"creating" | "ready" | "restoring" | "failed" | "expired"当前生命周期状态
vendorstring处理底层数据库的供应商(db.snapshot.get 上存在)
_tierstring由资产存储标记的存储保留层级(db.snapshot.get 上存在)
expires_atstring所存转储的 ISO 8601 过期时间戳(db.snapshot.get 上存在)
format: date-time
_account_idstring由资产存储标记的所属账户标识符(db.snapshot.get 上存在)

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.11db.snapshot.list

GET /v1/db/snapshot/list

列出托管数据库项目的快照。

参数

名称类型必填说明
project_idstring可选项目 id。
cursorstring可选不透明分页游标。
limitnumber可选返回条目的最大数量。

返回

{ items: Snapshot[], next_cursor?: string }
名称类型说明
itemsobject[]snapshot records列表
next_cursorstring | null下一页游标;null 表示最后一页

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X GET https://api.infrai.cc/v1/db/snapshot/list \
  -H "Authorization: Bearer $INFRAI_API_KEY"

2.12db.snapshot.restore

POST /v1/db/snapshot/restore/{snapshot_id}

将快照恢复为一个新的托管数据库项目。

参数

名称类型必填说明
snapshot_idstring
必填
快照 id。
new_namestring可选恢复后项目的名称(默认为源项目名加 -restored 后缀)。
idempotency_keystring可选客户端提供的幂等键。

返回

Project { id, name, connection_uri }
名称类型说明
project_idstring新注册 db 项目的唯一标识符
db_idstringdatabase instance的唯一标识符
pattern: ^dbi_[A-Za-z0-9]{20,}$
namestring此资源的可读名称(默认为源名称 + _restored)
vendorstring处理此请求的供应商
regionstring | null资源所在或处理的地理区域
plan"hobby" | "pro" | "scale"数据库实例定价方案
postgres_versionstring | null例如 "15.4"。
state"provisioning" | "active" | "paused" | "deleting" | "deleted" | "failed"此资源当前的生命周期状态
primary_branchstring | null主分支名称
default: "main"
created_atstring此资源创建的 ISO 8601 时间戳
format: date-time
mode"default_vendor" | "verified_account"投递模式或操作模式
vendor_db_idstring已还原物理数据库的供应商侧标识符
metadataobject请求计量元数据;还原时不存在(仅在原始项目创建时设置)
metadata.request_idstring-
metadata.timestampstring-
format: date-time
metadata.latency_msinteger-
≥ 0
metadata.entry_formstring-
metadata.cost_usdnumber-
metadata.vendorstring-
metadata.vendor_regionstring-
metadata.markup_pctnumber-
metadata.trace_idstring-
metadata.modestring-

示例

一次性前置(每个范例都假定已完成):

bash
# No SDK to install — every call is a plain HTTPS request.
# Get a project key by signing in at https://infrai.cc/login (Google/GitHub gives
# you $2 free credit; email sign-in starts at $0). On 402 INSUFFICIENT_CREDIT, add
# funds at https://infrai.cc/billing (or POST /v1/account/topup and open the
# returned checkout_url).
export INFRAI_API_KEY="ifr_..."
bash
curl -X POST https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID \
  -H "Authorization: Bearer $INFRAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"snapshot_id": "sample"}'
高级:指定 vendor

默认情况下 infrai 会把每次调用智能路由到最佳可用供应商——无需自己挑选 vendor。作为高级逃生口,本能力支持可选的 vendor 入参以锁定某个供应商。本能力当前所有可用 vendor 可通过该能力 id 对应的 discovery 端点实时获取——参见 discovery API

GET /v1/discovery/{capability}

db.project.create

3. 全部能力

本模块全部已路由能力——完整的对外 REST 契约。上方方法是带讲解的入门示例,此表是完整参考。

db.branch.createPOST /v1/db/branch/create

db branch create — managed database (Neon/Supabase/PlanetScale).

参数 (4)
名称类型必填说明
project_idstring必填Parent project id.
branch_namestring必填Name of the database branch
≥ 1 chars
from_branchstring可选Source branch to clone from.
default: "main"
idempotency_keystring | null可选Client-provided idempotency key; prevents duplicate execution on retry
db.branch.deleteDELETE /v1/db/branch/delete/{project_id}

db branch delete — managed database (Neon/Supabase/PlanetScale).

参数 (1)
名称类型必填说明
project_idstring必填Path parameter.
db.branch.getGET /v1/db/branch/get/{project_id}

db branch get — managed database (Neon/Supabase/PlanetScale).

参数 (1)
名称类型必填说明
project_idstring必填Path parameter.
db.branch.listGET /v1/db/branch/list

db branch list — managed database (Neon/Supabase/PlanetScale).

无请求参数。

db.project.createPOST /v1/db/project/create

db project create — managed database (Neon/Supabase/PlanetScale).

参数 (7)
名称类型必填说明
namestring必填Human-readable name for this resource
≥ 1 chars
vendor"tencent_pg" | null可选Explicit vendor pin (db is self-operated: tencent_pg only).
regionstring可选Geographic region where this resource is located or processed
default: "us-east-1"
plan"hobby" | "pro" | "scale"可选Pricing plan for the database instance
default: "hobby"
mode"default_vendor" | "verified_account"可选Delivery mode or operation mode
default: "default_vendor"
postgres_versionstring可选PostgreSQL version for the database
default: "15"
idempotency_keystring | null可选Client-provided idempotency key; prevents duplicate execution on retry
db.project.deleteDELETE /v1/db/project/delete/{project_id}

db project delete — managed database (Neon/Supabase/PlanetScale).

参数 (1)
名称类型必填说明
project_idstring必填Path parameter.
db.project.getGET /v1/db/project/get/{project_id}

db project get — managed database (Neon/Supabase/PlanetScale).

参数 (1)
名称类型必填说明
project_idstring必填Path parameter.
db.project.listGET /v1/db/project/list

db project list — managed database (Neon/Supabase/PlanetScale).

无请求参数。

db.snapshot.createPOST /v1/db/snapshot/create

db snapshot create — managed database (Neon/Supabase/PlanetScale).

参数 (3)
名称类型必填说明
project_idstring必填Project identifier
labelstring | null可选Human-readable snapshot label.
idempotency_keystring | null可选Client-provided idempotency key; prevents duplicate execution on retry
db.snapshot.getGET /v1/db/snapshot/get/{snapshot_id}

db snapshot get — managed database (Neon/Supabase/PlanetScale).

参数 (1)
名称类型必填说明
snapshot_idstring必填Path parameter.
db.snapshot.listGET /v1/db/snapshot/list

db snapshot list — managed database (Neon/Supabase/PlanetScale).

无请求参数。

db.snapshot.restorePOST /v1/db/snapshot/restore/{snapshot_id}

db snapshot restore — managed database (Neon/Supabase/PlanetScale).

参数 (3)
名称类型必填说明
snapshot_idstring必填Path param; the snapshot to restore.
new_namestring | null可选Name for the restored project (defaults to source-restored).
idempotency_keystring | null可选Client-provided idempotency key; prevents duplicate execution on retry

4. 完整示例

本模块的生产级端到端范例:先一次性配置,再运行业务流程,尽量覆盖本模块的多数 API。

单文件可运行 Python 程序(仅标准库、无 SDK):拷贝后填入 INFRAI_API_KEY 运行,即可按真实业务流逐步体验本模块核心 API——每一步都真实调用并计费,后续步骤复用前一步返回的真实字段。12 行 helper 就是全部集成代码。

python
#!/usr/bin/env python3
"""Infrai · db — runnable real-app example (single file, zero deps).

Copy this file, set your key, run it: every step is a REAL call to
api.infrai.cc, billed at the real (tiny) per-call price, printing the
live JSON response. Get a key at https://infrai.cc/login (Google/
GitHub sign-in grants $2 free credit); add funds at
https://infrai.cc/billing. No SDK — the 12-line helper below is the
entire integration."""
import json
import os
from urllib import error, request

KEY = os.environ.get("INFRAI_API_KEY") or "ifr_..."  # <- your key
BASE = "https://api.infrai.cc"


# Same raw HTTPS POST/GET as every per-method example on this page —
# wrapped once for reuse. There is nothing else to it: no SDK.
def infrai(method, path, body=None):
    req = request.Request(
        BASE + path, method=method,
        data=json.dumps(body).encode() if body is not None else None,
        headers={"Authorization": f"Bearer {KEY}",
                 "Content-Type": "application/json"})
    try:
        with request.urlopen(req, timeout=60) as r:
            return json.loads(r.read())
    except error.HTTPError as e:
        return json.loads(e.read())


def show(label, resp):
    print(f"\n== {label} ==")
    print(json.dumps(resp, indent=2, ensure_ascii=False))
    return resp


# 1) db.project.create — POST /v1/db/project/create · db project create — managed database (Neon/Supabase/PlanetScale).
r1 = show("db.project.create", infrai("POST", "/v1/db/project/create", {"name":"example"}))

# 2) db.branch.create — POST /v1/db/branch/create · db branch create — managed database (Neon/Supabase/PlanetScale).
r2 = show("db.branch.create", infrai("POST", "/v1/db/branch/create", {"project_id":"sample","branch_name":"example"}))

# 3) db.project.list — GET /v1/db/project/list · db project list — managed database (Neon/Supabase/PlanetScale).
r3 = show("db.project.list", infrai("GET", "/v1/db/project/list"))