Web service API

How to use PageSeeder's Web service API

create document

/members/{member}/groups/{group}/documents [POST]

com.pageseeder.psml.CreateDocument

Description

Create a PSML document.

Create a new PSML document.

Processes request for creating a new PSML document.

Note: There are various ways of specifying the target destination:

  • If the document config for the type specified has <folder> or <filename> defined, then these are used to compute the document path.
  • Otherwise, the following parameters are used: parentfolder, name.

Parameters

NameDescriptionRequiredTypeDefault value
nameName of file to create – without extension (required if filename not specified in document config).maybestring
descriptionDescription of new document.nostring
docidDocument ID.nostring
labelsComma-separated list of document label values.nostring
notification-contentContent of notification.nostring
notification-groupsComma-separated list of group names to notify (optional, default to current group name).nostring
notification-labelsComma-separated list of label values for the note (if exists creates a note).nostring
notification-subjectSubject of notification (default to document title or "Document Created").nostring
notifyNotification behavior.nonotificationsilent
notify-asyncWhether emails should be sent asynchronously (for slow email servers).nobooleanfalse
parentfolderPath of parent folder relative to the default group folder.nostring/
template.*"template.[name]" used as a param by the template to create the content.nodefined in template
titleDisplay title of new document.nostring
typeType of new document (optional, default is "default").nostring

Permission

Permissions requirements to be updated.

Response

The XML output follows this format:

<document-creation renamed="true"
                   original-name="New_document.psml">
    <uri id="138614"
         scheme="https"
         host="localhost"
         port="443"
         path="/ps/jb/group1/documents/new_document.psml"
         decodedpath="/ps/jb/group1/documents/new_document.psml"
         external="false"
         mediatype="application/vnd.pageseeder.psml+xml"
         created="2013-12-19T15:14:54+11:00">
       <displaytitle>New document</displaytitle>
   </uri>
</document-creation> 

Error Handling

CodeCause / Description
0x0000The name is required.
0x120AInvalid Document ID
0x1201Illegal character in filename
0x1209Existing Document ID
0x1211Existing URI
0x1216Invalid destination
0x1217Two contradictory parameters have been specified (url and name or url and parenturl or url and parentfolder or parenturl and parentfolder)
0x201BUnable to create XRefs
0x0204The Member was not found.
0x6202Invalid PSML document config.

Created on , last edited on