Web service API

How to use PageSeeder's Web service API

create hostalias

/hosts/{hostname}/hostaliases [POST]

com.pageseeder.host.CreateHostalias

Description

Create an alias to an existing host.

The host must exist before an alias can be created.

To create a host use the /hosts [POST] service.

Parameters

NameDescriptionRequiredTypeDefault value
nameThe name of the host aliasyesstring

name

The name of the host to create must be at least two characters long, at most 100 characters long, a valid host according to RFC 3986 - section 3.2.2 host , and match the following regular expression:

([a-z0-9]([a-z0-9-]*[a-z0-9])?\.?)+[a-z0-9]([a-z0-9-]*[a-z0-9])?

PageSeeder supports IPv4 addresses and regular names.

Note

The host name is not case-sensitive and it is not case-preserving: it will always be converted to lower case before being stored in the database.

Permission

Only administrators can use this service.

Response

If successful, the created alias is returned as an <alias> element wrapped in an <alias-creation> element as in the example below:

<alias-creation>
   <alias id="2" name="www.acme.com" />
</alias-creation>

Error handling

No specific errors expected for this generator.

Created on , last edited on