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 edityesstring
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 draftnobooleanfalse
fragmentprefixprefix in front of the generated fragment id (optional)nostring
htmlflag to specify if content is HTMLnobooleanfalse
labelsComma separated list of edit labelsnostring
markdownflag 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 labels for the note (if exists creates a note)nostring
note-notifythe note notification behavior [normal|announce|silent]noenumsilent
note-titletitle for edit notenostringEdit Note
notify-async Whether to send emails asynchronously (for slow email servers). no boolean false
tidyflag to perform Tidy on HTML contentnobooleantrue
transcludeA flag to resolve transclusions when outputting resultnobooleantrue

Permission

Undocumented permissions requirements.

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