Skip to main content

 Services

Web services from /about to /webhooks

groupfolders

/members/{member}/groups/{group}/groupfolders [POST]

Description

Create a new group folder with the path provided.

If the group folder already exists, this service only adds groups to share or edits the public flag.

Usage example

To share the images folder within the acme-specs group with the team-media group for editing and team-marketing group for read access only as user 123, you can make the following API request (newlines added for readability only):

POST https://example.org/ps/api/members/123/groups/acme-specs/groupfolders.json
?path=/ps/acme/specs/images
&groups=team-marketing
&editgroups=team-media

Parameters

NameDescriptionRequiredTypeDefault
editgroupsThe groups the folder is to be shared to and editable – comma-separated list of names maybestrings
groupsThe groups the folder is to be shared to – comma-separated list of namesmaybestrings
pathThe full path of the group folder beginning with / (/* suffix is added automatically) e.g. /ps/acme/specs/sharedyespath
publicWhether URIs should be accessible to publicmaybeboolean

One of public, groups, editgroups required.

groups/editgroups

These parameters let you specify the list of groups that the folder is shared to as a comma-separated list of group names. The names must not include admin, public or the owner group specified in the service URL as {group}.

Groups specified by groups parameter only have read access, while groups specified in the editgroups also give edit permissions to members who have edit permissions on these groups (contributor and above).

You must have project manager access to each of the specified groups and groups can only be specified once for each parameters and cannot be specified for both.

path

This required parameter specifies the full path of the folder to share.

It must begin with /ps/, be a valid URL-encoded path, and belong to the owner group specified in the service URL as {group}. For example, if the group is acme-specs, the path must start with /ps/acme/specs/.

A PageSeeder group folder ends with /*, but the path parameter can end with / or /*. If it does not, the path is normalized and the /* is automatically added.

public

Use this parameter to make this folder accessible publicly. When a group folder is made “public”, it only affects the permissions so that the folder and any folder or document within it can be read without any permission check, but folders are only listed in groups they are explicitly shared to.

Other sharing permissions specified by the groups and editgroups still apply.

Permission

Only project managers or administrators can invoke this service.

Response

If successful, the created group folder is returned as a  <groupfolder> element wrapped in a <groupfolder-creation> element.

<groupfolder-creation>
  <groupfolder id="[groupuri id]"
               scheme="[scheme]"
               host="[host]"
               port="[port]"
               path="[path]"
               external="[true|false]"
               public="[true|false]"
               sharing="[private|shared]">
    <sharing status="[private|shared]" 
             [hidden="2"] 
             [public="true"]>
      <share editable="true" 
             shareedits="true" 
             sharexrefs="true" 
             addcomments="true" 
             owner="true">
        <group name="my-group1" .../>
      </share>
      <share editable="true" 
             shareedits="false" 
             sharexrefs="true" 
             addcomments="false">
        <group name="my-group2" .../>
      </share>
      <share editable="false" 
             shareedits="true" 
             sharexrefs="false" 
             addcomments="true">
        <group name="my-group3" .../>
      </share>
    </sharing>
  </groupfolder>
</groupfolder-creation>

Or in JSON

{
  "groupfolder": { 
    "id": number,
    "scheme": string,
    "host": string,
    "port": number,
    "path": string,
    "external": boolean,
    "public": boolean,
    "sharing": string,
    "sharing": {
      "status": string,
      "share":[
        {
          "owner": boolean,
          "editable": boolean,
          "addcomments": boolean,
          "shareedits": boolean,
          "sharexrefs": boolean,
          "group": group
        }
      ]
    }
  }
}

Please note, the sharing JSON property is declared twice.

Error Handling

CodeCause / Description
0x1403If the group folder URL already exists in group
0x140AA public or group parameter is required
0x140BInvalid path
0x140CGroup folder path not in group
0x140DInvalid group
0x1410The groups parameter can not contain the owner group
0x1411A group can not be in both the groups and editgroups parameters
0x6401There is no default group folder for the group
Created on , last edited on