Web service API

How to use PageSeeder's Web service API

create document forurl

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

com.pageseeder.psml.CreateDocument

Description

Create a new PSML document.

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 URI on the request or the following parameters are used: url, parenturl, name.

Parameters

NameDescriptionRequiredTypeDefault value
name Name of file to create - without extension (required if request has no url and filename not specified in document config) maybe string
parenturl URL of parent URI (required if request has no url and folder not specified in document config) maybe url
url URL of target URI (required if request has no parenturl and folder/filename not specified in document config) maybe url
description Description of new document no string
docid Document ID no string
labels Comma separated list of document labels no string
name no string
notification-content Content of notification no string
notification-groups Comma-separated list of group names to notify (optional, default to current group name) no string
notification-labels Comma separated list of labels for the note (if exists creates a note) no string
notification-subject Subject of notification (default to document title or "Document Created") no string
notify Notification behavior no notification silent
template.* "template.[name]" used as a param by the template to create the content no defined in template
title Display title of new document no string
type Type of new document (optional, default is "default") no string

Permission

Undocumented permissions requirements.

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
0x1201 Illegal character in filename
0x1216 Invalid destination
0x120A Invalid Document ID
0x1209 Existing Document ID
0x1211 Existing URI
0x201B Unable to create XRefs
0x1217 Two contradictory parameters have been specified (url and name or url and parenturl or url and parentfolder or parenturl and parentfolder)
0x6202 Invalid PSML document config.

Created on , last edited on