Web service API

How to use PageSeeder's Web service API

<host>

Summary

The XML representation of a host.

Hosts are represented in the same manner regardless of their context.

Hosts can have aliases which are listed in the <aliases> element.

Usage context

Permitted content<aliases>
Permitted parent<host-creation> <host-modification> <hosts>

Attributes

This element includes the following attributes.

NameTypeRequiredDescription
externalxs:booleanyesWhether the host is external
idxs:longyesThe ID of the host in PageSeeder
namexs:stringyesThe host name (100)

@external

This boolean attribute indicates whether the domain for this host is external or matches the PageSeeder server.

@id

The PageSeeder database identifier for the host. It is always an immutable positive long value that is unique on a specific PageSeeder server within the set all hosts.

@name

The name of this host which should be a valid domain name. The value is not case-sensitive. The name cannot exceed 100 characters.

e.g. "app.example.org"

Examples

Host with no aliases

<host id="1" name="ps.example.com" external="false"/>

Host aliases

<host id="1" name="app.example.com" external="false">
   <aliases>
      <alias id="1" name="app.example.org"/>
      <alias id="2" name="app.example.net"/>
   </aliases>
</host>

Schema

XML Schema

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

<xs:complexType name="host">
  <xs:sequence>
    <xs:element name="aliases" type="aliases" minOccurs="0"/>
  </xs:sequence>
  <xs:attribute name="external" type="boolean" use="required"/>
  <xs:attribute name="flags"    type="xs:string"/>
  <xs:attribute name="id"       type="id"  use="required"/>
  <xs:attribute name="name"     type="hostname" use="required"/>
</xs:complexType>

<xs:simpleType name="hostname">
  <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    <xs:pattern value="([a-z0-9]([a-z0-9-]*[a-z0-9])?\.?)+[a-z0-9]([a-z0-9-]*[a-z0-9])?"/>
  </xs:restriction>
</xs:simpleType>

Relax Schema

element host {
   attribute external { xs:boolean },
   attribute flags    { text }?,
   attribute id       { xs:long },
   attribute name     { text { maxLength = "100"}},
   element aliases
}

Compatibility

See also

Created on , last edited on