---
title: "The whole page tree of a published space"
method: GET
path: "/api/public/spaces/{id}/tree"
tags: ["public"]
---

# The whole page tree of a published space

`GET /api/public/spaces/{id}/tree`

## Request

- Base URL: `https://telawiki.com`
- URL: `https://telawiki.com/api/public/spaces/{id}/tree`
- Auth: none required

Structure plus card metadata (excerpt, reading time, cover, tags) — enough to render an index without fetching every page.

## Response `200`

Pages.

- object
  - `pages` PublicTreeNode[], required
    - `id` integer, required
    - `title` string, required
    - `parent_id` integer, nullable, required
    - `position` integer, required
    - `created_at` string, required: `YYYY-MM-DD HH:MM:SS` in UTC.
    - `updated_at` string, required: `YYYY-MM-DD HH:MM:SS` in UTC.
    - `kind` 'deck' | 'sheet': Absent for an ordinary prose page.
    - `excerpt` string
    - `reading_minutes` integer
    - `cover` string
    - `tags` string[]

## Other responses

- `400`: `invalid_id` — a path parameter was not a positive integer.
- `404`: `not_found` — no such published space. Private and non-existent are indistinguishable.
- `500`: `internal` — server error.

---

[API](https://skmtc.dev/telawiki/apis/tela-rest-api.md) · [All operations](https://skmtc.dev/telawiki/apis/tela-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telawiki/apis/tela-rest-api/revisions/f316f31f6fcb?raw)
