Turso Cloud API 參考 介面資源 資料庫
擷取資料庫設定
擷取屬於組織或使用者的個別資料庫設定。
GET
https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration curl -L -X GET 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration' \
-H 'Authorization: Bearer TOKEN'
OpenAPI
openapi: 3.0.1
info:
title: Turso Platform API
description: API description here
license:
name: MIT
version: 0.1.0
servers:
- url: https://api.turso.tech
description: Turso's Platform API
security: []
paths:
/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration:
get:
summary: Retrieve Database Configuration
description: >-
Retrieve an individual database configuration belonging to the
organization or user.
operationId: getDatabaseConfiguration
parameters:
- $ref: '#/components/parameters/organizationSlug'
- $ref: '#/components/parameters/databaseName'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/DatabaseConfigurationResponse'
components:
parameters:
organizationSlug:
in: path
name: organizationSlug
required: true
schema:
type: string
description: The slug of the organization or user account.
databaseName:
name: databaseName
in: path
required: true
schema:
type: string
description: The name of the database.
schemas:
DatabaseConfigurationResponse:
type: object
properties:
size_limit:
type: string
description: >-
The maximum size of the database in bytes. Values with units are
also accepted, e.g. 1mb, 256mb, 1gb.
example: '10000'
allow_attach:
type: boolean
description: Allow or disallow attaching databases to the current database.
example: true
deprecated: true
block_reads:
type: boolean
description: The current status for blocked reads.
example: false
block_writes:
type: boolean
description: The current status for blocked writes.
example: false
delete_protection:
type: boolean
description: Prevent the database from being deleted.
example: true
allowed_ips:
type: array
items:
type: string
description: >-
List of allowed IP addresses and CIDR blocks. Empty means no IP
restriction.
example:
- 203.0.113.7
- 10.0.0.0/8
allowed_aws_vpc_ids:
type: array
items:
type: string
description: >-
List of allowed AWS VPC endpoint IDs. Empty means no VPC endpoint
restriction.
example:
- vpce-0fe6c8807461bba49
同步自官方 Turso 文件倉庫 (
tursodatabase/turso-docs
· MIT 開源授權)
檢視官方原文 ↗