# List ancestors for a page

Fetches information about the ancestors of a page.

Endpoint: GET /api/v1/sites/{siteId}/hierarchy/{pageId}/ancestors
Version: v1
Security: Bearer

## Path parameters:

  - `siteId` (string, required)
    The identifier of the site.
    Example: "3875AC96-8ECF-44AE-8E25-851068B373CE"

  - `pageId` (string, required)
    Page identifier.
    Example: "54106BDF-4C3C-4101-A07D-3BB41B63A76A"

## Query parameters:

  - `language` (string)
    The ISO country-region language code for which to retrieve the ancestors, for example: en-US, ar-AE.
    Example: "en-US"

  - `environmentId` (string)
    The identifier of the environment
    Example: "main"

## Response 200 fields (application/json):

  - `insertOptions` (array,null)
    Insert options for the page.

  - `insertOptions.id` (string,null)
    Template ID
Example value: 6fe7d655-1e3d-4c27-8010-5777f06c6c4f
    Example: "6fe7d655-1e3d-4c27-8010-5777f06c6c4f"

  - `insertOptions.displayName` (string,null)
    Template display name
Example value: Page
    Example: "Page"

  - `insertOptions.templateType` (string)
    The type of template.
    Enum: "ItemTemplate", "BranchTemplate"

  - `hasVersions` (boolean)
    Whether the page has versions in the queried language.
Example value: True
    Example: true

  - `children` (array,null)
    Children of the page.

  - `id` (string,null)
    The page identifier.
Example value: 68900348a3b84eb8ac7df4d179c25727
    Example: "68900348a3b84eb8ac7df4d179c25727"

  - `name` (string,null)
    The page's system name.
Example value: Home
    Example: "Home"

  - `displayName` (string,null)
    The page's display name.
Example value: Site Home
    Example: "Site Home"

  - `language` (string,null)
    The page language.
Example value: en-US
    Example: "en-US"

  - `version` (integer)
    The current version of the page.
Example value: 1
    Example: 1

  - `templateId` (string,null)
    The identifier of the template this page is based on.
Example value: 6fe7d6551e3d4c2780105777f06c6c4f
    Example: "6fe7d6551e3d4c2780105777f06c6c4f"

  - `parentId` (string,null)
    The identifier of the page's parent.
Example value: 4bc0c81a280b4b13890b7b074b9d68f4
    Example: "4bc0c81a280b4b13890b7b074b9d68f4"

  - `hasPresentation` (boolean)
    If set to true, this page can be rendered in the SitecoreAI Pages application. This value is automatically set to false for the root item of the site, as well as for the folders if there are any.
Example value: True
    Example: true

  - `hasChildren` (boolean)
    Whether the page has any child pages.
Example value: True
    Example: true

  - `isLatestPublishableVersion` (boolean)
    Whether the page version is latest publishable version
Example value: True
    Example: true

  - `permissions` (object)
    The access rights of the current user to the site.

  - `permissions.canAdmin` (boolean)
    Whether the current user has admin rights. Being an admin means that you control access permissions for other users, and have full read and write rights.
Example value: False

  - `permissions.canWrite` (boolean)
    Whether the current user has permissions to edit values. Users with write access also have read access.
Example value: False

  - `permissions.canCreate` (boolean)
    Whether the current user has permission to create entities.
Example value: False

  - `permissions.canDelete` (boolean)
    Whether the current user has permission to delete entities.
Example value: False

  - `permissions.canRename` (boolean)
    Whether the current user has permission to rename entities.
Example value: False

  - `permissions.canRead` (boolean)
    Whether the current user has permission to see entities, including all their parameters.
Example value: False

  - `permissions.canPublish` (boolean)
    Whether the current user has permission to publish sites in this environment.
Example value: False

  - `permissions.canDuplicate` (boolean)
    Whether the current user has permission to duplicate entities.
Example value: False

  - `permissions.canWriteLanguage` (boolean)
    Whether the current user has permission to write item language entities.
Example value: False

  - `locking` (object)

  - `locking.canUnlock` (boolean)
    Whether the current user can unlock the page for editing.
Example value: False

  - `locking.isLocked` (boolean)
    Whether the page is currently locked for editing.
Example value: False

  - `locking.lockedBy` (string,null)
    If the page is locked, the user who locked it.
Example value: john.smith@skate-park.com
    Example: "john.smith@skate-park.com"

  - `locking.lockedByCurrentUser` (boolean)
    Whether the page was locked by the current user.
Example value: False

  - `path` (string,null)
    The path for the page.
Example value: Sitecore/Content/Home/Categories/Products/MyProduct
    Example: "Sitecore/Content/Home/Categories/Products/MyProduct"

  - `route` (string,null)
    The public-facing URL path relative to the site's root.
Example value: /Aboutus
    Example: "/Aboutus"

## Response 400 fields (application/json):

  - `type` (string,null)
    The type of the error response entity.

  - `title` (string,null)
    The title of the error response entity.

  - `status` (integer,null)
    The response status code.

  - `detail` (string,null)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string,null)
    If available, a URI reference that identifies the specific occurrence of the problem.


