Skip to main content

 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 must be the location of the resource to create relative to the web app folder. 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 tries to guess whether a file or a folder is to be created based on the name; if the name ends with a file extension, the service assumes a file, otherwise it creates a folder.

Parameters

NameDescriptionRequiredTypeDefault value
locationThe location of the resource to create, relative to the Web containeryespath

Permission

This service requires administrator.

Response

When the resource is successfully created, this service returns 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.

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

Created on , last edited on