Skip to main content

 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
archivedWhether to return archived projects/groups onlynobooleanfalse
subgroupsIf subgroups should be included in the responsenobooleantrue

Permission

The user must be logged in.

Response

This service returns a list of <membership> elements wrapped in a <memberships> element with a single <member> element included before the list.

<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="1234"
              email-listed="true"
              notification="immediate"
              status="normal"
              role="manager">
    <group id="4"
           name="acme-asia"
           description="Demo group for Asia" />
  </membership>
  <membership id="9876"
              email-listed="true"
              notification="immediate"
              status="normal"
              role="manager">
    <group id="5"
           name="acme-australia"
           description="Demo group for Australia" />
  </membership>
</memberships>

Example of memberships that include a subgroup. John Smith is a member of acme-asia because he is a member of acme-japan which is a subgroup of acme-asia:

<memberships>
  <member id="3"
          firstname="John"
          surname="Smith"
          username="jsmith"
          email="jsmith@example.org"
          status="activated">
    <fullname>John Smith</fullname>
  </member>
  <membership id="123"
              email-listed="true"
              notification="immediate"
              status="normal"
              role="reviewer"
              subgroups="acme-japan">
    <group id="4"
           name="acme-asia"
           description="Demo group for Asia" />
  </membership>
  <membership id="987"
              email-listed="true"
              notification="immediate"
              status="normal"
              role="manager">
    <group id="5"
           name="acme-japan"
           description="Demo group for Japan" />
  </membership>
</memberships>

Error Handling

CodeCause / Description
0x1029A member is not logged in
0x102AMember not found
Created on , last edited on