Skip to main content

 Services

Web services from /about to /webhooks

list projecttree

/members/{member}/projecttree [GET]

Description

List the projects and groups 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 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 service to load the groups and subprojects of each project.

Parameters

NameDescriptionRequiredTypeDefault value
archivedWhether to return archived projects/groups onlynobooleanfalse
forIf 'server', return all projects/groups for server (Administrator only) [server|member]nobooleanmember
groupsWhether to return groupsnobooleantrue
nameprefixPrefix that project/group’s full name must have to be returnednostring
resultsizeThe max number of results (the tree might have more nodes as ancestors are always added)nointeger1000

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.

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.

<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:

{
  "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.

Created on , last edited on