---
title: "Service: /members/{member}/projecttree [GET]"
source: https://dev.pageseeder.com/api/services/list-projecttree-GET.html
description: "Lists projects and groups in hierarchical tree structure for a specified member or server. Supports filtering by archive status, name prefix, and result size. Admin-only for server-wide queries."
last_updated: 2026-09-02T11:36:17+10:00
document_type: api_endpoint
operation_id: group-GET
resource_id: group
path_template: /members/{member}/projecttree
http_method: GET
api_category: group
implementation_version: 6.3000
api_since: 4.9100
deprecated_since: null
obsolete_since: null
api_support: supported
cache_control: null
generated_at: 2026-09-02
tokens: ~1097
---

# /members/\{member\}/projecttree \[GET\]

## Description

List the [projects](../../reference/glossary/project.md) and [ groups](../../reference/glossary/group.md) as a tree for either the specified member or the whole server.

This service returns the list of groups and projects in hierarchical form so that [subprojects](../../reference/glossary/sub_project.md) and groups appear nested correctly within the specified project.

### Usage

If your PageSeeder instance contains many projects or groups, you can progressively load the project sub tree by using the nameprefix parameter.

You can also use the [/members/\{member\}/projects/\{group\}/subprojecttree](list-subprojecttree-GET.md) service to load the groups and subprojects of each project.

## Parameters

| Name | Description | Required | Type | Default value |
| --- | --- | --- | --- | --- |
| archived | Whether to return archived projects/groups only | no | boolean | `false` |
| for | If 'server', return all projects/groups for server (Administrator only) \[`server\|member`\] | no | boolean | `member` |
| groups | Whether to return groups | no | boolean | `true` |
| nameprefix | Prefix that project/group’s full name must have to be returned | no | string |  |
| resultsize | The max number of results (the tree might have more nodes as ancestors are always added) | no | integer | `1000` |

### archived

By default, this service only returns memberships to groups and projects which are not archived.

Use `archived=true` to only list the memberships to archived groups and projects.

### for

This service returns the groups that the specified member is a member of, including subgroups.

If you are an administrator, you can use `for=server` to return all the projects and groups for the server.


Since the server option can return many results, you can reduce the number of results using the `groups` and `nameprefix` parameters.


### groups

This parameter controls whether groups should be returned in the response.

If your PageSeeder instance contains many projects or groups, setting this parameter to `false` lets you load the project tree structure and load the groups for each individual projects using the nameprefix parameter.

### nameprefix

This parameter filters the results by only returning the projects and groups with full name matching the specified prefix.

### resultsize

This parameter limits the number of groups and projects which are returned. The maximum value allowed is 10000.

> **Note:** The returned tree might have more nodes than the specified result size as ancestors projects are always added.

## Permission

Any member can invoke this service for themselves.

Only an administrator can request the project trees for the entire server with `for=server`, or for another member.

## Response

The returned XML is as follows (in alphabetical order by name within the same level).

The `for` attribute/property is not include when the `for=server` parameter is used.

```xml
<projects for="[username|email]">
  <project id="[id]"
           name="[name]"
           owner="[owner]"
           description="[description]"
           ...>
    <!-- groups -->
    <group id="[id]"
           name="[name]"
           description="[description]"
           owner="[owner]"
           ... />
    <group id="[id]"
           name="[name]"
           description="[description]"
           owner="[owner]"
           ... />
    ...

    <!-- sub projects -->
    <project id="[id]"
             name="[name]"
             description="[description]"
             owner="[owner]"
             ...>
      <group id="[id]"
             name="[name]"
             description="[description]"
             owner="[owner]"
             ... />
      <group id="[id]"
             name="[name]"
             description="[description]"
             owner="[owner]"
             ... />
          ...
    </project>
    ...
  </project>
</projects>
```

Or in JSON:

```json
{
  "for": string,
  "groups": [
    {
      "id": number,
      "name": string,
      "owner": string,
      "type": string,
      "description": string,
      "groups: [
        ...
      ]
    }
  ]
}
```

In JSON, use the `type` property to distinguish groups from projects. The `groups` array property is only specified if `type` is `project`.

## Error Handling

No specific errors expected for this service.

