Web service API

How to use PageSeeder's Web service API

list uri xreftree

/groups/{group}/uris/{uri}/xreftree [GET]

com.pageseeder.xref.XRefTreeLoader

Description

Loads the XRef tree for a URI

Starting from a nominated URI, this service returns a tree of fragments that contain XRefs.

  • The fragments and XRefs in the tree are in the same order as they are in the document, starting with the default fragment.
  • Only PSML document fragments accessible to the group will be in the response.

If allfragments=false and depth is larger than 1:

  • Forward XRefs to fragments (not default) will only include XRefs from that fragment.
  • Reverse XRefs will only include reverse XRefs from that fragment and default.

If duplicates=false and XRefs for a URI or fragment have already been output they may be omitted later in the tree when they are leaf nodes. When this happens the element <omitted forward="[true|false]" reverse="[true|false]" /> will be output. If forward="true" then forward XRefs may have been omitted and if reverse="true" then reverse XRefs may have been omitted. They will be omitted from that point and below in the tree.

Parameters

NameDescriptionRequiredTypeDefault value
allfragmentswhether to follow XRefs in fragments not directly referencednobooleanfalse
duplicateswhether to output duplicate XRefs (that already appear in the tree)nobooleanfalse
followtypescomma-separated list of types of XRefs to follownostringembed,transclude
forwardwhether to include forward XRefsnobooleantrue
forwarddepththe maximum depth of forward XRefs to follownointeger0
propertiescomma-separated list of property names to include (not properties with datatype="xref" or "markdown")nostring
reversewhether to include reverse XRefsnobooleanfalse
reversedepththe maximum depth of reverse XRefs to follownointeger0
typescomma-separated list of types of XRefs to include (default all)nostring
versionname of version to load for all documentsnostring
xrefsizethe maximum number of XRefs returnednointeger500

Permission

Undocumented permissions requirements.

Response

Output format is as follows:

<uri id=[id] ... >
     <!-- URI details -->
     <displaytitle>[displaytitle]</displaytitle>
     ...
     <fragment id="default">
       <!-- Forward XRefs found -->
       <xref title="[title]"
             display="[display]"
             uriid="[target ID]" ... >
        [<metadata>
            <property name="" ... /> ...       
         </metadata>]
         <fragment id="[fragment ID]"
                  [labels=""] ...>
           [<property name="" ... /> ...]
           ...
         </fragment>
         <fragment ...>
           ...
         </fragment>
         ...
       </xref>
       <xref title="[title]"
             display="[display]"
             uriid="[target ID]" ... />
       <xref title="[title]" display="[display]"
             uriid="[target ID]" frag="2" ...>
         <fragmentnotfound id="2"/>
       </xref>
        ...
       <!-- Reverse XRefs found -->
       <reversexref title="[title]"
                    display="[display]"
                    uriid="[source ID]"
                   [urilabels=""] ...>
         <fragment ...>
           ...
         </fragment>
         ...
       </reversexref>
       ...
     </fragment>
     <fragment id="10">
       <xref title="[title]"
             display="[display]"
             uriid="[target ID]"
            [urilabels=""]
            [blocklabels=""]
            [inlinelables=""]
            [property=""] ... >
         <!-- if forward or reverse xrefs have been omitted -->
         <omitted forward="true"
                  reverse="true"/>
       </xref>
     </fragment>
     ...
     <!-- if xrefsize has been reached -->
     <limitreached xrefs="[xrefsize]"/>
   </uri>

Error Handling

No specific errors expected for this service.

Created on , last edited on