Skip to main content

 Web service API

How to use PageSeeder's Web service API

administrators

/administrators [POST]

com.pageseeder.member.CreateAdministrator

Description

Add a member to the list of accounts with administrator privileges on the server.

If no member exists for the email address or username specified, an account is created.

When existing members are made administrators, their password is automatically reset. The system does not prevent a member from entering their previous password again, but it does not accept that password unless it is strong enough.

Parameters

NameDescriptionRequiredTypeDefault value
auto-activateIf a new member account should automatically activate (member-password should also be set)nobooleanfalse
emailThe email address of the member (required if member-username  is not provided)conditionalstring
firstnameThe given name of the member (used to create a new account)nostringMember
groupGroup name or ID for email template to override the group on the requestnostring
member-passwordThe password of the member account (only to be set if no account exists)nostring[random]
member-usernameThe username of the member. This  defaults to the member email address (username is required if email is not provided)conditionalstring
notify-asyncIf email messages should be sent asynchronously (for slow or sensitive email servers)nobooleanfalse
send-emailIf the member should receive a “welcome and reset password” messagenobooleantrue
surnameThe family name of the member (used to create a new account)nostring[4 digits]

Permission

This service requires administrator.

Response

<administrator-creation [member-created="true"]>
  <member id="[member id]"
          firstname="[first name]"
          surname="[surname]"
          username="[username]"
          status="[activated|unactivated|set-password]">
    <fullname>[first and last name of the member]</fullname>
  </member>
</administrator-creation>

Error Handling

0x1002If the email address is invalid
0x1005If the maximum number of members on the server has been reached
0x100FIf send-email=true and member doesn't have an email address
0x101AThe username and email are not from the same member
0x1015Password is too weak
0x1016Password cannot be equal to username
0x1025The member is already an administrator
Created on , last edited on