본문 바로가기
WIKI 기술 지식 베이스

위치 목록 조회

원문 보기 위키 갱신

데이터베이스를 만들거나 복제할 수 있는 위치들의 목록을 가져오는 API예요. 위치 코드(location code)와 이름 매핑을 확인할 때 사용해요.

출처: 문서

본문

데이터베이스를 만들거나 복제할 수 있는 위치 목록을 반환해요.

curl -L https://api.turso.tech/v1/locations \
  -H 'Authorization: Bearer ***'
import { createClient } from "@tursodatabase/api";

const turso = createClient({
  org: "...",
  token: "",
});

const locations = await turso.locations.list();

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/locations:
    get:
      summary: List Locations
      description: Returns a list of locations where you can create or replicate databases.
      operationId: listLocations
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  locations:
                    type: object
                    additionalProperties:
                      type: string
                    description: A mapping of location codes to location names.
                example:
                  locations:
                    aws-ap-northeast-1: AWS AP NorthEast (Tokyo)
                    aws-ap-south-1: AWS AP South (Mumbai)
                    aws-eu-west-1: AWS EU West (Ireland)
                    aws-us-east-1: AWS US East (Virginia)
                    aws-us-east-2: AWS US East (Ohio)
                    aws-us-west-2: AWS US West (Oregon)

더 알아보기 (Learn more)