Skip to main content

 Services

Web services from /about to /webhooks

start loading

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

Description

Starts loading the specified loading zone.

Before calling this service, use /upload PUT or /upload POST to upload files into the loading zone.

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

<upload-request version="3.0">
  <files>
    <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" />
      </action>
    </file>
  </files>
  <validate>true</validate>
  <overwrite summary="false">false</overwrite>
  <createxrefs>true</createxrefs>
  <index>true</index>
  <message subject="File upload"
           notification="silent">The file has been uploaded.
  </message>
</upload-request>

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">
  <files>
    <mediatype value="application/vnd.pageseeder.psml+xml"
               docid="[filename]-[document-type]" 
               title="[filename]" 
               labels="doc1,doc2"/>
  </files>
</upload-request>

Depending on overwrite and summary parameters, the load might be stopped and the following summary 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-ipsums"
                     file-overwrites="2"
                     file-new="2"
                    [url-orverwrite=""
                     url-new=""]>
    <files>
      <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>
        <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"
              ... />
      </file>
    <files>
    <urls>
      [<file ... />]
    </urls>
  </overwrite-summary>
</thread>

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

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

The load is then stopped after the action script is run and the path to the resulting file is 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">
  <message>Success!!</message>
  <action progress="0">Script</action>
  <previewpath>
    /session/EpqLa9LHnB5ivBZPZeCbpDTpvabcdabcd/acme/spec/Test doc 1.psml
  </previewpath>
</thread>

If updating code to use this service instead of the obsolete 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>.

Parameters

NameDescriptionRequiredTypeDefault value
assignedtoID of assigned member for workflow (requires status specified)nostring
createxrefsWhether to resolve image and cross-references in the filesnobooleantrue
descriptionThe workflow description (requires status specified)nostring
dueThe task due date and time in ISO-8601 format – status MUST be set. e.g. 2010-10-25T18:00:00+11:00nodatetime
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 filesnobooleantrue
modeIf preview then loading is 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, must be silent, normal or announce (notification-* parameters are ignored if silent )nostring
overwriteWhether to overwrite existing filesnobooleanfalse
overwrite-propertiesWhether to overwrite existing properties (labels, docid, title, ...) and metadatanobooleanfalse
priorityPriority for workflow e.g. High, Medium, Low (requires status specified)nostring
statusStatus for workflow e.g. Initiated ,In Progress, Complete, Approved, Suspended, Terminatednostring
summaryWhether to return an overwrite summary, if true and overwrite=true, always return summary, if true and overwrite=false, return summary only if overwrite occursnoboolean
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 files with schematronnobooleantrue
workflow-labelsLabels for workflow e.g. Important, Typo (requires status specified)nostring
workflow-notifyWorkflow notification flag, must be silent, minimal, normal or announce (requires status specified)nostring
xmlspecThe XML specification for the load (overridden by parameters)nostring

Permission

Contributor or higher in the group.

Response

<load-start>
  <thread id="[thread ID]" ... >
     [thread XML]
  <thread>
</load-start>

Error Handling

No specific errors expected for this service.

Created on , last edited on