Web service API

How to use PageSeeder's Web service API

group resources

/groups/{group}/resources [POST]

com.pageseeder.developer.CreateProjectFile

Description

Creates a new empty project resource.

The location parameter should be the location of the resource to create relative to the web application directory. For example:

  • /WEB-INF/foo/document.xsl
  • /WEB-INF/foo.bar/my/document.js
  • /woconfig/foo/styles/test.css

Only resources which are not part of the default project can be created.

This service will try to guess to whether a file or a folder should be created based on the name; if the name ends with a file extension, the service assumes a file, otherwise it will create a folder.

Parameters

NameDescriptionRequiredTypeDefault value
location the location of the resource to create relative to the Web container yes path

Permission

Only Administrators are allowed to invoke this service.

Response

When the resource is successfully created, this service will return the following XML and HTTP status 201 (Created).

<file name="[name]"
      path="[path]"
      type="[folder|file]"
      media-type="[media type]"
      length="0"
      status="[forbidden|created]"/>

 

Error Handling

No specific errors expected for this service.

Warning!

This service returns non-standard error messages. It will return an HTTP status code 400 error if the resource already exists. This may change in the near future.

Created on , last edited on