Web service API

How to use PageSeeder's Web service API

start loading

/members/{member}/groups/{group}/loadingzone/start [POST]



Starts loading the specified loading zone.

Before calling this service use Servlet: LoadingZoneUpload to upload files into the loading zone.

Below is the xmlspec parameter content showing example files and other default settings. See upload-request-3.0.dtd.

 <upload-request version="3.0">
     <file path="lorem_ipsum_files/cat.gif" />
     <file path="lorem_ipsum_files/cat.jpg" />
     <file path="lorem_ipsum.psml" docid="lorem1" title="Lorem Ipsum"
         description="This is a test document." labels="test,basic" />
     <file path="sample GIF image.gif" />
     <file path="sample DOCX document.docx" />
       <action project="default" target="import">
         <param name="remove.original" value="true" />
         <param name="create.subfolder" value="false" />
         <param name="remove.config" value="true" />
   <overwrite summary="false">false</overwrite>
   <message subject="File upload" notification="silent">The file has been uploaded.</message>

In the xmlspec files section the following dynamic tokens can be used in filename, docid or title attributes: filename (without extension), extension, document-type, year, month, date. For example:

 <upload-request version="3.0">
     <mediatype value="application/vnd.pageseeder.psml+xml"
         docid="[filename]-[document-type]" title="[filename]" labels="doc1,doc2"/>

Depending on overwrite and summary parameters the load may be stopped and the summary below returned by the Service: /groups/{group}/threads/{threadid}/progress [GET].

 <thread id="8a1955f42b4139bf6ea86334ed62d6cf" name="Loading 5 document/folders"
     username="jsmith" groupid="4" status="completed">
   <message>Overwrite confirmation needed</message>
   <overwrite-summary destination="/ps/acme/specs/documents/lorem" overwrites="2" new="2">
     <file name="lorem" path="/" type="folder" existing="2" overwrites="1" new="1">
       <file name="lorem_ipsum_files" path="lorem_ipsum_files" overwrite="true" type="folder" existing="3" overwrites="1" new="1">
         <file name="cat.gif" path="lorem_ipsum_files/cat.gif" extension="gif" overwrite="true" ... />
         <file name="cat.jpg" path="lorem_ipsum_files/cat.jpg" extension="jpg" create="true" ... />
       <file name="lorem_ipsum.psml" path="lorem_ipsum.psml" extension="psml" level="portable" behavior="psml--" overwrite="true" ... />
       <file name="sample GIF image.gif" path="sample GIF image.gif" extension="gif" create="true" ... />

If parameter mode=preview then xmlspec should only contain one file, for example:

 <upload-request version="3.0">
     <file path="Test doc 1.docx">
       <action project="default" target="preview-docx-import" delay="2000" />

The load will then be stopped after the action script is run and the path to the resulting file will be returned by the thread progress service (above) as follows:

 <thread id="9c13726540fe2db56d9b0e1278647f60" name="Preview of Test doc 1.docx"
     username="jsmith" groupid="4" status="completed">
   <action progress="0">Script</action>
   <previewpath>/session/EpqLa9LHnB5ivBZPZeCbpDTpve7B9vNGt9ByRU50/acme/specs/Test doc 1.psml</previewpath>


If updating code to use this service instead of the deprecated com.pageseeder.load.servlets.StartLoading note that <upload-request> must be sent as an xmlspec parameter. Also in the returned XML <thread> is wrapped by <load-start>.


NameDescriptionRequiredTypeDefault value
assignedtoID of assigned member for workflow (requires status specified)nostring
createxrefsWhether to resolve image and cross references in the filesnoboolean
descriptionThe workflow description (requires status specified)nostring
dueWorkflow due date format is yyyy-MM-dd (requires status specified)nostring
folderThe folder the file should be uploaded into (relative to the root of the group, ignored if url is specified)nostring
indexWhether to index the filesnoboolean
modeIf 'preview' then loading will be stopped after action scripts are run (requires xmlspec)nostring
notification-contentUpload notification message textnostring
notification-labelsLabels for upload message e.g. Important, Typonostring
notification-subjectUpload notification subject textnostring
notifyUpload notification flag, e.g. 'silent', 'normal', 'announce'nostring
overwriteWhether to overwrite existing filesnoboolean
overwrite-propertiesWhether to overwrite existing properties (lables, docid, title, ...)noboolean
priorityPriority for workflow e.g. 'High', 'Medium', 'Low' (requires status specified)nostring
statusStatus for workflow e.g. 'Initiated' ,'In Progress', 'Complete', 'Approved', 'Suspended', 'Terminated'nostring
summaryWhether to return an overwrite summary, if true and overwrite=true, always return summary, if true and overwrite=false, return summary only if overwrite will occurnoboolean
uploadidAn ID to uniquely identify this upload (overrides xlinkid)nostring
urlA URL pointing to the folder the file should be uploaded intonourl
validateWhether to validate the filesnoboolean
workflow-labelsLabels for workflow e.g. Important, Typo (requires status specified)nostring
workflow-notifyWorkflow notification flag, e.g. 'silent', 'minimal', 'normal', 'announce' (requires status specified)nostring
xmlspecThe XML specification for the load (overridden by parameters)nostring


Undocumented permissions requirements.


   <thread id="[thread ID]" ...>
     [thread XML]

Error Handling

No specific errors expected for this generator.

Created on , last edited on