wiki:RESTfulVD

Virtual Documents RESTful methods (/restful/vd/...)

Adding a VD file system entity

Method

  • URL: /vd/content/<path>
  • Method: PUT
  • Query parameters:
    • skpath: Path of a VD Spec
    • parname: optional parameter name to be associated with a VD
    • parvalue: optional list of values for the parname parameter
  • Returns: text/xml
  • Description: Creates a VD FS entity under path <path> associated with a VD Spec under path skpath. Optionally, only one parameter can be added upon creation. To add other parameters, use special RESTful methods (see below). Returns XML with success, or throws an exception if something went wrong, e.g. if VD Spec does not exist under the provided path.

Example

Deleting a VD file system entity

Method

  • URL: /vd/content/<path>
  • Method: DELETE
  • Returns: text/xml
  • Description: Deletes a VD FS entity under path <path>. Returns XML with success code, or throws an exception if something went wrong.

Example

Getting VD content

Method

  • URL: /vd/content/<path>
  • Method: GET
  • Query parameters:
    • matpath: Where to materialize a VD
  • Returns: text/xml
  • Description: Returns VD content and, optionally, materializes it (if matpath parameter is provided). If matpath is already exists, then a new version of document is committed to a repository. If matpath does not exists, then the whole folder structure is created and committed to a repository.

Example

Adding/replacing a VD parameter

Method

  • URL: /vd/params/<path>
  • Method: POST
  • Query parameters:
    • parname: parameter name to be associated with a VD
    • parvalue: list of values for the parname parameter
  • Returns: text/xml
  • Description: Add/replaces the parname parameter. Values are obtained from parvalue parameter.

Example

Deleting a VD parameter

Method

  • URL: /vd/params/<path>
  • Method: DELETE
  • Query parameters:
    • parname: parameter name to be deleted from a VD
  • Returns: text/xml
  • Description: Deletes the parname parameter from a VD under path <path>.

Example

Submitting an edited VD

Method

  • URL: /vd/submit/<path>
  • Method: POST
  • Query parameters:
    • logmsg: xSVN log message if commit is successful
  • Body: edited VD content
  • Returns: text/xml
  • Description: Submits a VD under path <path> for editing. Content of an edited VD is taken from a request body.

Example