Skip to main content

 API

PageSeeder Web services API documentation

<event>

Summary

The <event> element represents a history event that occurred on a URI (document or URL).

Usage context

Permitted content<author>, <labels>, <change>
Permitted parent<history>

Attributes

This element includes the following attributes:

NameTypeRequiredDescription
idxs:longyesThe unique ID for this event in PageSeeder
datetimexs:dateTimenoWhen this event occurred
typeenumyesThe event type
fragmentxs:stringnoThe fragment this event applies to (only for certain event types)
titlexs:stringnoThe event title (only for certain event types)
uriidxs:longnoThe ID of the target URI (only for certain event types)
targetfragmentxs:stringnoThe target fragment of the xref (only for xref events)
versionxs:stringnoThe version the document was reverted to (only for revert events)

@id

This attribute is the unique ID for this event in PageSeeder.

@datetime

The date and time that this event occurred, in ISO 8601 format.

@type

The event type, possible values are the following:

  • comment
  • creation
  • draft
  • edit
  • image
  • modification
  • move
  • note
  • revert 
  • structure
  • task
  • upload
  • version
  • workflow
  • xref

@fragment

The ID of the fragment this event is attached to. This attribute is specified only for event of types comment, task, edit, draft, xref, note or image.

@title

When this attribute is specified for event of types comment, task, or structure, it represents the title of the event (in other words, the comment title or “Share document structure”). When it is for events of type xref or image, it's value is the title of the target URI. When it is for event type version , it is the version name.

@targetfragment

This attribute can only be specified for events of type xref, and its value is the target fragment of the xref.

@uriid

This attribute can only be specified for events of type xref or image, and its value is the unique ID of the target URI.

@targetfragment

This attribute can only be specified for events of type xref, and its value is the target fragment of the xref.

@version

This attribute can only be specified for events of type revert, and is the name of the version (or the date/time of the event) the document was reverted to.

Examples

<event id="1224"
       datetime="2017-03-06T16:43:42+11:00"
       type="modification">
  <author id="71"
          firstname="Alan"
          surname="Smith"
          username="asmith"
          status="activated">
    <fullname>Alan Smith</fullname>
  </author>
  <change type="title" to="My document" />
</event>
<event id="1258"
       datetime="2017-02-05T12:01:56+11:00"
       type="structure"
       title="Fragment Move">
  <author id="71"
          firstname="Alan"
          surname="Smith"
          username="asmith" 
          status="activated">
    <fullname>Alan Smith</fullname>
  </author>
</event>
<event id="13987"
       datetime="2016-05-05T11:11:46+11:00"
       type="comment"
       title="I have a question">
  <author id="14"
          firstname="John"
          surname="Jones"
          username="jjones"
          status="activated">
    <fullname>John Jones</fullname>
  </author>
</event>

Schema

XML Schema

<xs:element name="event" type="event" />

<xs:complexType name="event">
  <xs:sequence>
    <xs:element ref="author" minOccurs="1" maxOccurs="1"/>
    <xs:element ref="labels" minOccurs="0" maxOccurs="1"/>
    <xs:element ref="change" minOccurs="0" maxOccurs="1"/>
  </xs:sequence>
  <xs:attribute name="id" type="xs:long" />
  <xs:attribute name="datetime" type="xs:dateTime" use="optional" />
  <xs:attribute name="type">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:enumeration value="comment" />
        <xs:enumeration value="creation" />
        <xs:enumeration value="draft" />
        <xs:enumeration value="edit" />
        <xs:enumeration value="image" />
        <xs:enumeration value="modification" />
        <xs:enumeration value="note" />
        <xs:enumeration value="revert" />
        <xs:enumeration value="structure" />
        <xs:enumeration value="task" />
        <xs:enumeration value="upload" />
        <xs:enumeration value="version" />
        <xs:enumeration value="workflow" />
        <xs:enumeration value="xref" />
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>
  <xs:attribute name="fragment" type="xs:string" use="optional" />
  <xs:attribute name="title" type="xs:string" use="optional" />
  <xs:attribute name="uriid" type="xs:long" use="optional" />
  <xs:attribute name="targetfragment"
                type="xs:string"
                use="optional" />
  <xs:attribute name="version"
                type="xs:string"
                use="optional" />
</xs:complexType>

Relax Schema

element event {
  attribute id { xs:long },
  attribute datetime{ xs:dateTime }?,
  attribute type { "comment", "creation", "draft", "edit", "image", "modification", "note", "revert", "structure", "task", "upload",  "version", "workflow", "xref" },
  attribute fragment { xs:string }?,
  attribute title { xs:string }?,
  attribute uriid { xs:long }?,
  attribute targetfragment { xs:string }?,
  attribute version { xs:string }?,
  element author?,
  element labels?,
  element change?
}

Compatibility

No change since initial API release.

Created on , last edited on