Skip to main content

 API

PageSeeder Web services API documentation

<host>

Summary

Following is an 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 hostname ( max 100 characters)
virtualxs:booleanyesWhether the host is virtual. PageSeeder v5.99 or higher.

@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 must be a valid domain name. The value is not case-sensitive. The name cannot exceed 255 characters.

For example: app.example.org

@virtual

This boolean attribute indicates whether the domain for this host is virtual (i.e. the domain URLs do not resolve to actual resources). Introduced in PageSeeder v5.99.

Examples

Host with no aliases

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

Host aliases

<host id="1" name="app.example.com" external="false" virtual="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="id" type="id" use="required"/>
  <xs:attribute name="name" type="hostname" use="required"/>
  <xs:attribute name="virtual" type="boolean" 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 id       { xs:long },
   attribute name     { text { maxLength = "100"}},
   attribute virtual  { xs:boolean },
   element aliases
}

Compatibility

No change since initial API release.

Created on , last edited on