Web service API

How to use PageSeeder's Web service API

revert uri fragment

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

com.pageseeder.psml.RevertFragment

Description

Revert Fragment's Content.

Revert a fragment to the edit provided.

Parameters

NameDescriptionRequiredTypeDefault value
editidID of the edit to get the content from.yesstring
labelsComma-separated list of edit label values (if not specified, the labels of the edit are used, if empty, no labels are used).nostring
lastmodifiedThe last modified date/time (ISO 8601) of the fragment (prevents edit clashes).nostring
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.nonotificationsilent
note-titleTitle for edit note.nostringEdit Note
notify-asyncWhether emails should be sent asynchronously (for slow email servers).nobooleanfalse
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 there 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