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 have been omitted and if reverse="true" then reverse XRefs have been omitted.

Parameters

NameDescriptionRequiredTypeDefault value
allfragments whether to follow XRefs in fragments not directly referenced no boolean false
duplicates whether to output duplicate XRefs (that already appear in the tree) no boolean false
followtypes comma-separated list of types of XRefs to follow no string embed,transclude
forward whether to include forward XRefs no boolean true
forwarddepth the maximum depth of forward XRefs to follow no integer 0
properties comma-separated list of property names to include (not xref properties) no string
reverse whether to include reverse XRefs no boolean false
reversedepth the maximum depth of reverse XRefs to follow no integer 0
types comma-separated list of types of XRefs to include (default all) no string
version name of version to load for all documents no string
xrefsize the maximum number of XRefs returned no integer 500

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]" ... >
         <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 max="[xrefsize]"/>
   </uri>

Error Handling

No specific errors expected for this service.

Created on , last edited on