---
title: "Get all ancestors of page"
method: GET
path: "/pages/{id}/ancestors"
tags: ["Ancestors"]
---

# Get all ancestors of page

`GET /pages/{id}/ancestors`

Returns all ancestors for a given page by ID in top-to-bottom order (that is, the highest ancestor is the first
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
will be available by calling this endpoint with the ID of first ancestor in the response payload.

This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such
as [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get).

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to access the Confluence site ('Can use' global permission).

## Path parameters

- `id` integer, required

## Query parameters

- `limit` integer

## Response `200`

Returned if the requested ancestors are returned.

- object
  - `results` Ancestor[]
    - `id` string — ID of the ancestor
    - `type` 'page' | 'whiteboard' | 'database' | 'embed' | 'folder' — The type of ancestor.
  - `_links` MultiEntityLinks
    - `next` string — Used for pagination. Contains the relative URL for the next set of results, using a cursor query parameter. This property will not be present if there is no additional data available.
    - `base` string — Base url of the Confluence site.

## Other responses

- `400` — Returned if an invalid request is provided.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.
- `404` — Returned if the calling user does not have permission to view the specified page or the page was not found.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api-v2/revisions/c4bd1ed570f2/schema)
