> ## Documentation Index
> Fetch the complete documentation index at: https://developers.bottari.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 템플릿 목록 읽기

> 데이터베이스의 템플릿을 앱과 같은 순서로 읽습니다.

데이터베이스의 템플릿을 앱과 같은 순서로 읽습니다. 템플릿은 앱에서 만듭니다. 템플릿으로 페이지를 만드는 방법은 [페이지 만들기](https://developers.bottari.ai/ko/api-reference/pages/create.md#템플릿)에서 확인할 수 있습니다.

**Authorization** `string` *required*

`Bearer <토큰>` 형식입니다. [토큰 자세히 알아보기 →](https://developers.bottari.ai/ko/auth/tokens.md)

**Bottari-Version** `string`

선택 항목입니다. `2026-03-11`만 받습니다. 빼면 현재 버전을 사용하고, 다른 값을 보내면 400을 반환합니다.

**id** `string` *required*

데이터 소스 ID입니다. 데이터베이스 ID를 넣으세요.

**name** `string`

이름에 이 텍스트가 포함된 템플릿만 남깁니다. 대소문자는 구분하지 않습니다. 빈 값은 400입니다.

**page\_size** `number` (default: 100)

1\~100입니다.

**start\_cursor** `string`

앞 응답의 `next_cursor`입니다.

**templates** `object[]`

**properties**

**id** `string`

템플릿 ID입니다. `template_id`로 사용하세요.

**name** `string`

템플릿 제목입니다. 제목이 없는 템플릿은 `New page`입니다.

**is\_default** `boolean`

데이터베이스의 기본 템플릿이면 `true`입니다.

**next\_cursor** `string | null`

다음 목록의 커서입니다.

**has\_more** `boolean`

더 있으면 `true`입니다.

API로 지운 템플릿은 완전히 지워지기 전까지 이 목록에 남습니다.

## 페이지처럼 동작하는 템플릿

템플릿 ID는 페이지 ID처럼 동작합니다.

| 요청 | 템플릿 |
| - | - |
| `GET /v1/pages/{id}`와 그 쓰기 | 행처럼 동작합니다. |
| 블록과 마크다운 | 다른 문서처럼 읽고 쓸 수 있습니다. |
| `query`가 있는 `POST /v1/search` | 제목이 맞으면 나옵니다. |
| `query`가 없는 `POST /v1/search` | 나오지 않습니다. |
| `POST /v1/data_sources/{id}/query` | 나오지 않습니다. |
| 관계 값 | 404 |
| 웹훅 | 이벤트가 없습니다. |

## 오류

| 상태 | `code` | 원인 |
| - | - | - |
| 400 | `validation_error` | `page_size`나 `name`이 틀렸거나, `start_cursor`가 목록에 없습니다. `The start_cursor provided is invalid: ...`를 반환합니다. |
| 404 | `object_not_found` | 연결하지 않은 데이터베이스입니다. |

공통 오류는 [공통 규칙](https://developers.bottari.ai/ko/api-reference/overview.md#오류)에서 확인할 수 있습니다.

```bash curl theme={null}
curl "https://api.bottari.ai/v1/data_sources/exampleDb001/templates?name=weekly" \
  -H "Authorization: Bearer $BOTTARI_TOKEN" \
  -H "Bottari-Version: 2026-03-11"
```

```json 200 theme={null}
{
  "templates": [
    {
      "id": "exampleTpl01",
      "name": "Weekly report",
      "is_default": false
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "request_id": "33333333-3333-4333-8333-333333333333"
}
```

```json 400 theme={null}
{
  "object": "error",
  "status": 400,
  "code": "validation_error",
  "message": "The start_cursor provided is invalid: exampleTpl09",
  "request_id": "33333333-3333-4333-8333-333333333333"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.