Web service API

How to use PageSeeder's Web service API

list self memberships

/self/memberships [GET]

com.pageseeder.membership.SelfMemberships

Description

Get the memberships for the member that is currently authenticated.

Parameters

NameDescriptionRequiredTypeDefault value
archived Whether to return archived projects/groups only no boolean false
subgroups If subgroups should be included in the response no boolean true

Permission

Undocumented permissions requirements.

Response

This service returns a list of <membership> elements wrapped in a membership with the <member> included before each individual membership.

<memberships>
   <member ... />
   <membership ... >
      <group|project ... />
      <details> ... </details>
   </membership>
   <membership ... > ... </membership>
   ...
</memberships>

For example, if user Joan Smith belongs to group "acme-asia" and "acme-australia":

<memberships>
   <member id="123" firstname="Joan" surname="Smith" username="jsmith" status="activated">
      <fullname>Joan Smith</fullname>
   </member>
   <membership id="123" email-listed="true" notification="immediate" flags="e" status="normal" role="manager">
      <group id="4" name="acme-asia" description="Demo group for Asia" />
      <details>
         <field position="1" name="organisation" title="Organisation" editable="true">ACME Asia</field>
         <field position="2" name="telephone"    title="Telephone"    editable="true">12345678</field>
         <field position="3" name="notes"        title="Notes"        editable="true">Follow up</field>
      </details>
   </membership>
   <membership id="987" email-listed="true" notification="immediate" flags="e" status="normal" role="manager">
      <group id="5" name="acme-australia" description="Demo group for Australia" />
   </membership>
</memberships>

Example of memberships that include a subgroup:

<memberships>
   <member id="3" firstname="John" surname="Smith" username="jsmith" email="jsmith@example.org" status="activated">
      <fullname>John Smith</fullname>
   </member>
   <membership email-listed="true" notification="none" status="normal" role="manager" subgroups="role-administrator">
      <group id="10" name="config-data" description="Product configuration" owner="acme"/>
   </membership>
   <membership id="6" email-listed="true" notification="none" status="normal" role="manager" created="2015-01-20T11:58:54+11:00">
      <group id="6" name="role-administrator" description="Group for administrators" owner="acme"/>
   </membership>
   <membership id="636599" email-listed="true" notification="none" status="normal" role="manager" created="2015-05-26T11:53:35+10:00">
      <group id="639" name="role-poweruser" description="Group for power users" owner="acme"/>
   </membership>
</memberships>

Error handling

CodeCause / Description
0x1029 A member is not logged in
0x102A Member not found

Created on , last edited on