Skip to main content

 Element reference

Service API elements from <alias> to <workflow>

<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)

@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:

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

@fragment

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

@title

When this attribute is specified for event of types attachedto, 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, its value is the title 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.

@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.

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="upload" />
        <xs:enumeration value="creation" />
        <xs:enumeration value="modification" />
        <xs:enumeration value="structure" />
        <xs:enumeration value="attachedto" />
        <xs:enumeration value="edit" />
        <xs:enumeration value="draft" />
        <xs:enumeration value="note" />
        <xs:enumeration value="xref" />
        <xs:enumeration value="image" />
        <xs:enumeration value="comment" />
        <xs:enumeration value="task" />
        <xs:enumeration value="workflow" />
        <xs:enumeration value="version" />
      </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:complexType>

Relax Schema

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

Compatibility

No change since initial API release.

Created on , last edited on