Advanced

Advanced topics

Servlet: ImportMembers

com.pageseeder.ImportMembers

Description

Imports members from comma separated data.

HTTP Method: GET

Simply returns data to produce the form for importing members.

HTTP Method: POST

Actually import the members into PageSeeder.

Import data

The data uses comma separated values as:

[firstname],[surname],[email],[username?],[password?],[field1?], ... ,[field15?]

If a value contains a comma, it should be wrapped by double quotes ". It is not possible to include a line delimiter in a value, line delimiters are automatically interpreted as a separate member.

In order to import the users into a group, use the group parameter. The membership details can be set using the notification, role and listed parameters.

Error handling

If a user already exists, the existing details are returned instead of the original details sent in the request. The details sent in the import data do NOT overwrite the existing data.

If the data is parsable but the email or username is invalid, it will be put as a failed user.

If a parsing error occurs, this method will return an error message with HTTP status 400 (Bad Request).

XML output

The returned XML is in the form:

<root>
   <group><!-- Group --></group>
   <totalread>[lines read]</totalread>
   <created>
     <member><!-- Created Member #1 --></member>
     <member><!-- Created Member #2 --></member>
     <member><!-- Created Member #3 --></member>
     ...
   </created>
   <failed>
     <member><!-- Failed Member #1 --></member>
     <member><!-- Failed Member #1 --></member>
     <member><!-- Failed Member #1 --></member>
     ...
   </failed>
   <existing>
     <member><!-- Existing Member #1 --></member>
     <member><!-- Existing Member #1 --></member>
     <member><!-- Existing Member #1 --></member>
     ...
   </existing>
 </root>

HTTP Parameters

dataThe data to import (required)yesString
groupThe name of the group the users should be imported intono String
notificationThe default notification for the users (applicable only if group is specified)no StringImmediate 
roleThe default role for the users (applicable only if group is specified)norolegroup's default
listedWhether to list the email address of the imported users (applicable only if group is specified)no booleanfalse
createpersonalWhether to create the personal group as the user is importnobooleanfalse

Notification

The valid notification parameter values are:

  • Immediate - for normal notifications
  • Daily - for a daily digest
  • None - for announcements only

Role

The Role must be one of the following:

  • Guest
  • Reviewer
  • Contributor
  • Manager
  • Moderator
  • Approver
  • Mod & App (for moderator and approver)

 

Created on , last edited on