Web service API

How to use PageSeeder's Web service API

add uri fragment

/members/{member}/groups/{group}/uris/{uri}/fragments [POST]

com.pageseeder.psml.CreateFragment

Description

Create new edit on specified fragment.

Parameters

NameDescriptionRequiredTypeDefault value
contentContent of edit.yesstring
afterfragmentID of the fragment to insert the fragment after (required if no section or beforefragment, overrides section and beforefragment).maybestring
beforefragmentID of the fragment to insert the fragment before (required if no section or afterfragment, overrides section).maybestring
sectionID of the section to append the fragment to, after other fragments (required if no beforefragment or afterfragment).maybestring
draftA flag to save edit as a draft.nobooleanfalse
fragmentprefixPrefix in front of the generated fragment ID (optional).nostring
htmlFlag to specify if content is HTML.nobooleanfalse
labelsComma-separated list of edit labels values.nostring
markdownA flag to specify if content is markdown (overrides html parameter).nobooleanfalse
noteContent for edit notes (if exists, creates a note).nostring
note-labelsComma-separated list of label values for the note (if exists, creates a note).nostring
note-notifyThe note notification behavior [normal|announce|silent].noenumsilent
note-titleA title for the edit note.nostringEdit Note
notify-asyncWhether emails should be sent asynchronously (for slow email servers).nobooleanfalse
tidyA flag to perform Tidy on HTML content.nobooleantrue
transcludeA flag to resolve transclusions when outputting result.nobooleantrue

Permission

Permissions requirements to be updated.

Response

When successful, the new fragment is returned as a <document-fragment> wrapped in a <fragment-creation> element with the following optional attributes:

  • notification-email-delayed="true" – if the edit note notification has been queued due to large number of recipients.
  • notification-email-failed="true" – if the edit note notification could not be sent.
  • unresolved-xrefs="true" – if their are unresolved cross references in the fragment.

Example:


<fragment-creation notification-email-failed="true">
    <document-fragment>
        <locator id="325"
                 fragment="example"
                 editid="6340"
                 modified="2015-03-24T13:21:57">
            <notes>
                <note id="6342"
                      modified="2015-03-24T13:21:57"
                      title="Typography">
                    <content>Fixed typographical error.</content>
                </note>
            </notes>
        </locator>
        <fragment id="example">
            <para>This is the fragment content</para>
        </fragment>
    </document-fragment>
</fragment-creation>

Error Handling

No specific errors expected for this service.

Created on , last edited on